Forum Moderators: phranque
Been looking at this for a few days, and seem to find 2 ways of doing a 301 from one domain to the other ;-(
Can anyone please let me know which one is the correct one to enter into the .htaccess file of the OLD domain please? **Assuming** that you want *all* page rank to transfer over.
redirect 301 / http://www.mynewsite.com/
Or:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^myoldsite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.myoldsite.com$
RewriteRule ^(.*)$ http://www.mynewsite.com/$1 [R=301,L]
Also, are there any other advantages or disadvantages to using either one of them please?
Any help appreciated.
Sev.
[edited by: jdMorgan at 12:09 am (utc) on Feb. 22, 2005]
[edit reason] Merged duplicate posts. [/edit]
Just another thought, I would much rather do the shorter code, but if you thought for example that doing the longer code would make the new site come up quicker in the visitors window, then I would do that.
Bit of a newbie to 301's, so looking to cover all bases if possible ;-)
Thanks.
Sev.