Forum Moderators: phranque

Message Too Old, No Replies

2 Domains, 1 Site, How do I retain URLs in address bar?

Getting two domains to display the same content

         

paralax

3:23 pm on Mar 19, 2008 (gmt 0)

10+ Year Member



I have two URLs, (domain1.com, domain2.com) pointing to one hosting account, which was setup under domain1.com

Currently, I can access www.domain1.com/bar.html and www.domain2.com/bar.html and all is fine

But if I try going to "www.domain2.com/foo/bar.html", the address bar is rewritten to say "domain1.com/foo/bar.html" I would like it to remain as "www.domain2.com/foo/bar.html"

Any way to do this? Currently my .htaccess is empty, and I would assume this is how it should work by default.

jdMorgan

1:08 am on Mar 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If your .htaccess file is empty, and this redirect is not the result of one of your scripts executing, then you'll have to ask your host to fix this problem, since it is likely the result of some code in the httpd.conf or conf.d server configuration files.

Once the configuration code executes, it is too late to 'fix it' with .htaccess.

BTW, it is not a good idea to have more than one URL resolve to the same content. The two URLs will 'compete' for ranking in the search engines, and neither will rank as well as it should. Also, each search engine will pick which URL it likes best, and drop the other -- and you won't be able to control which. So frankly, you'd be much better off redirecting all requests for domain1 to domain2, and linking to and promoting only domain1 (or vice-versa). Try searching WebmasterWorld for "duplicate content penalty" for more information.

Jim