Domain Redirection While Maintaining Original URL

Posted by Steve on Stack Overflow See other posts from Stack Overflow or by Steve
Published on 2010-03-06T17:29:19Z Indexed on 2010/03/12 16:27 UTC
Read the original article Hit count: 160

Filed under:
|
|
|

I have two domains ("this_site.com" and "that_site.com") that I want to point to the same place (same set of files).

BUT

What I really want to do is maintain the original URL in the address bar while the visitor accesses the different pages.

Example: The primary domain holding the web files is "this_site.com". If I type in "that_site.com" in the address bar, I want the address bar to keep displaying "that_site.com" no matter where they go on the web site. Normal domain redirection causes the URL displayed in the address bar to change to the 'master' domain (i.e. the visitor that typed in "that_site.com" will see the address bar's URL change to "this_site.com").

Is there some sort of .htaccess trick that I can employ to do this?

What I'm trying to do is NOT confuse visitors who visit one URL and find themselves on a different URL as well as avoid the additional expense and trouble of having to maintain two separate hosting accounts.

© Stack Overflow or respective owner

Related posts about .htaccess

Related posts about domain