Forum Topic: Domain redirect and mask?

Forum: .htaccess Forum : Redirecting • Posted by Carlos Tam • Updated:

Hello! Great book, i havent finish reading it at all but I have a problem with a site and want to know if anyone here can help me:

I created a full wordpress powered website, the domain URL is www.casasplatino.mx the site is finished and my client also has the domain www.casasplatino.com

Right now, I created a redirect so if you go to casasplatino.com → redirect to → casasplatino.mx

I put the following rule in the .htaccess in the hosting of casasplatino.com

RewriteEngine on
RewriteCond %{HTTP_HOST} ^casasplatino\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.casasplatino\.com$
RewriteRule ^(.*)$ "http\:\/\/www\.casasplatino\.mx\/$1" [R=301,L]

I copied that rule from a wordpress forum and works great but what my client is asking me to do now is to “mask” the domain or I dont know whats the name of it. He wants that always in the adress bar say: casasplatino.com

Is there a way to do this instead of moving all my site to the casasplatino.com hosting?

Thank you

1 Reply to “Domain redirect and mask?”

Posted by Jeff Starr

Hi Carlos,

As far as I know it is not possible to mask a domain with .htaccess, but it should be possible if you have access to Apache’s main configuration file, as explained here:

http://stackoverflow.com/questions/9106826/using-htaccess-to-mask-a-domain

Another possible option is to configure the domain hosting (DNS) to point both domains to the same website. Contact the domain-name host/registrar for more info on this, if it is possible, etc.

Good luck!