I am trying to mask a domain-B.com with all content from domain-A.com. So, domain-A.com has all the content and is a regular database driven website, but I’d like anyone who visits domain-B.com to see the content from domain-A.com, but still see domain-B.com in the address bar.
So, if the visitor goes to domain-A.com/product-1.php, they see domain-A.com/product-1.php as you’d expect. If they visit domain-B.com/product-1.php, they see content from domain-A.com/product-1.php, but still see domain-B.com/product-1.php in the address bar, and so on. Both these domains need to be secure, too.
I have tried regular domain forwarding and masking, but viewing the source, it appears to use iFrames, which is not what I want. The source code should look the same. Not sure if this is best done via .htaccess or not. Any help would be much appreciated.
FYI - I was able to work it out...
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain-B.com
RewriteRule ^(.*) http://domain-A.com/$1 [P]