Forum Moderators: phranque
I'm not sure if I can use the mod_rewrite because MyNewDomain.com uses PHP to pull files from MyOldDomain.com
Here is how it works: since all files in MyOldDomain.com are in .html and not .php, I'm using an SSI command in MyNewDomain.com as in this example:
PHP file: <?include("http://www.MyOldDomain.com/myfile.htm"?>
HTML file: <!--#include file="myfile.php" -->
Is it possible to use a mod_rewrite redirect in this case?
Or should I create 250 files with this command:
<meta http-equiv="refresh"content="0;url=http://www.MyOldDomain.com/filename.htm">
Or should I be using this in the htaccess file:
redirectpermanent /oldpage1.htm [newurl.com...]
redirectpermanent /oldpage2.htm [newurl.com...]
I'm a tech dilettante. A friend helped me set up the PHP and I gathered the above redirect info from forums. I have never dealt with a htaccess file before. All I know is that my current htaccess file looks 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
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/
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!
Jim
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...]
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:
User-agent: *
Disallow: /
And the robots.txt file from MyOldDomain.com reads:
User-agent: *
Disallow: /a/
Disallow: /f/
Disallow: /cgi-bin/
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?
The robots.txt checker is seeing - and showing you - exactly what the spiders will see, a redirect to old_domain.
HTH,
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. :)
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.
Jim