views:

245

answers:

2

I have a domain www.siteA.com, which uses Joomla, while the domain www.siteB.com is empty.

I would like to show the content of the domain www.siteA.com at www.siteB.com.

I tried to solve the problem first by making a domain redirection by .htaccess, but I could not show SiteA's content at SiteB.

How can you show the contents of mysiteA.com at mysiteB.com by domain masking in .htaccess?

+1  A: 
RewriteEngine On
RewriteRule ^.*$ http://www.siteA.tld/$1 [NC]

This should rewrite every request to siteA.

Unkwntech
@Unkwntech: Does the command make the domain mask?
Masi
+1  A: 

You really should be doing this by CNAME-ing the domain, but if you really want to use .htaccess you can do what @Unkwntech suggests

Edit: It would just look like

www.siteB.com CNAME www.siteA.com

Whichever way you do it (CNAME or htaccess) you're probably going to get an SEO penalty for duplicate content.

Greg
How would you do it with CNAME?
Masi
Thank you! The best way seems to be to transfer the content in Site A to Site B. I need to solve the problem of how to change the domain names at mysql databases, since I use Joomla.
Masi