Unable to show siteA's content at siteB by domain masking

908 Views Asked by At

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?

2

There are 2 best solutions below

2
Greg On BEST ANSWER

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.

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

This should rewrite every request to siteA.