| 4:28 pm on Mar 6, 2003 (gmt 0)|
Your web root .htaccess will be invoked on your new server before any php processing takes place. Therefore, I believe you will be able to fix your problem simply by placing the following line in your new server's .htaccess file:
RedirectPermanent / http://www.oldomain.com/
This will redirect any request to your newserver back to your old server.
I hope I understood your question! If not, it should be pretty obvious when you try the above - Do it when your site traffic is low!
| 5:47 pm on Mar 6, 2003 (gmt 0)|
Thanks Jim! Do I place that line RedirectPermanent / [oldomain.com...] on the top or the bottom of the htaccess file? Does it make any difference where it is?
Is it OK if I have the htaccess file like this:
Options Indexes FollowSymLinks Includes
AddType application/x-httpd-cgi .cgi
AddType text/x-server-parsed-html .html
AddType text/html .shtml
AddHandler server-parsed .htm
RedirectPermanent / [OLDDOMAIN.com...]
| 6:34 pm on Mar 6, 2003 (gmt 0)|
Well, technically, you don't need any of the other stuff any more, since any and all requests will be redirected. It really wouldn't matter either way, but putting it at the top would be more efficient if you want to keep the other lines for now.
| 1:52 am on Mar 7, 2003 (gmt 0)|
Thanks Jim. The redirect command is working well, but it is causing me a problem with the robots.txt file.
Because of the redirect command, RedirectPermanent / [OLDDOMAIN.com...] the validator is unable to check the robots.txt file from MyNewDomain, instead it validates the robots.txt file from MyOldDomain.
The robots.txt in MyNewDomain.com reads:
And the robots.txt file from MyOldDomain.com reads:
I worry that googlebot will be unable to read the robots.txt file from MyNewDomain. In this situation, how can I disallow googlebot from indexing MyNewDomain.com?
| 2:05 am on Mar 7, 2003 (gmt 0)|
Understand that with the redirect in place, your new_domain - for practical purposes - no longer exists. Robots cannot access any of its content because they now get redirected to old_domain unconditionally. So, there is nothing there that they can access, and there is therefore no need to disallow access.
The robots.txt checker is seeing - and showing you - exactly what the spiders will see, a redirect to old_domain.
| 3:06 am on Mar 7, 2003 (gmt 0)|
I'm learning a lot, thanks Jim :)
When googlebot follows websites' outbound links to MyNewDomain.com only to be redirected to MyOldDomain.com will MyOldDomain receive google's ranking credit for these outbound links?
If the answer is yes, it will save me from having to notify all those sites to update their links. :)
| 7:44 pm on Mar 19, 2003 (gmt 0)|
yes, it will.
| 7:57 pm on Mar 19, 2003 (gmt 0)|
Sorry - I missed your last post! :o
As oLeon states, you'll be OK with the redirect in place, but it would still be a good idea to try to get those incoming links updated. You will focus your domain-branding and avoid having two hits on your server for every visitor using those old links.
| 12:39 am on Mar 20, 2003 (gmt 0)|
Thanks Jim :) There is something else that maybe you can help me with. I have a php script that creates an error log file for my 404. It lists all my files that contain link errors. Do you know of a script that will only list internal link errors as "linkname.htm" instead of listing just the file name? Since my files are quite large and I have dozens of internal links, such script would be more useful to me than the one that just list file names.