View Full Version : need help with a 301 redirect
Bernard
24-06-2007, 13:39/01:39PM
So TimeWarner is changing to Comcast in my area and that means that RoadRunner (ISP) customers like me are facing migration to Comcast servers. While TW/Comcast have disclosed that the RoadRunner email servers will remain active for a year forwarding emails to a comcast email server, they have not said anything about personal web pages stored on RoadRunner servers.
I happen to have a simple page I threw up on my RoadRunner web space some time ago that is currently ranking very nicely on a very competitive phrase and earning enough money every month to pay for my cable bill.
So, I need to move my page now while I have a chance to hopefully serve notice to folks (ie. search engines) that the page is moving before TW/Comcast pulls the plug on the RoadRunner web server.
I'm trying to set up a simple .htaccess file to redirect my index page stored in my folder to a new site, but it's not working as I hoped:
Current page:
http://home.houston.rr.com/mypersonaldirectory/
Desired new page:
http://www.newdomain.com/newdirectory/
I tried setting .htaccess with a single line as such:
Redirect 301 / http://www.newdomain.com/newdirectory
but, it keeps appending /mypersonaldirectory to the path. The .htaccess file is stored in the mypersonaldirectory folder.
Help???
Quadrille
24-06-2007, 14:22/02:22PM
Originally posted by Bernard
Desired new page:
http://www.newdomain.com/newdirectory/
I tried setting .htaccess with a single line as such:
Redirect 301 / http://www.newdomain.com/newdirectory
but, it keeps appending /mypersonaldirectory to the path. The .htaccess file is stored in the mypersonaldirectory folder.
Howzabout Redirect 301 / http://www.newdomain.com - if it adds /mypersonaldirectory, you'll end up with
http://www.newdomain.com/mypersonaldirectory ... close enough?
I suspect the problem lies in your existing site being effectively a folder of someone else's site.
So long as you get them to the new domain, a 301 there (where you have full control) can take them to the destination you want.
Blue
24-06-2007, 15:48/03:48PM
Try this, or try working with it, Bernard:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^subdomain.website.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.subdomain.website.com$
RewriteRule ^(.*)$ http://www.website.com/subdomain/ [R=301,L]
WebSavvy
24-06-2007, 20:22/08:22PM
If the index page isn't PHP, add the following to your .htaccess file
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
AddHandler application/x-httpd-php .htm .html
Now, if the index page is .php, .htm, .html -- doesn't matter because of the added .htaccess codes above.
In the index page you can now safely add simply this only, and it will take care of your 301 issues.
<?php
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.newdomain.com/newdirectory/" );
?>
Let me know if it works for you or not? :)
Bernard
25-06-2007, 09:06/09:06AM
Thanks for the suggestions everyone.
Unfortunately, the RoadRunner server choked any time I tried to turn on the Rewrite Engine, so I ended up having to use my original Redirect and then set up a second redirect on the new domain. It's working now even if it jumps through two 301 redirects instead of one.
For those interested, I added the following to the .htaccess on the new domain:
RewriteRule ^mypersonaldirectory/$ / [R=301, L]
to redirect the folder back to the new domain root.
g1smd
25-06-2007, 10:08/10:08AM
Search engines cannot pass any Pagerank through chained redirects like this.
Your visitors will get to the site OK, but search engines will choke on this a bit.
Bernard
25-06-2007, 13:16/01:16PM
Originally posted by g1smd
Search engines cannot pass any Pagerank through chained redirects like this.
Have you done any tests to validate that statement? I know the last time I moved a site to a new domain (using a single 301 redirect), it took about 3 months before Google gave the new domain the same SERPs enjoyed by the corresponding pages of the old domain. I didn't pay that much attention to the PageRank.
g1smd
25-06-2007, 19:31/07:31PM
Yes, PR is passed when you have:
URL:OLD ---> redirect ---> URL:NEW
but it does not get passed properly when this happens:
URL:OLD ---> redirect ---> URL:intermediate ---> redirect ---> URL:NEW
The problem is the chained redirects.
Bernard
25-06-2007, 22:41/10:41PM
Well, I guess I'm going to test your claim... I don't have much choice.
Connie
25-06-2007, 23:23/11:23PM
Just curious. Why not contact TimeWarner or RoadRunner and ask what they plan to do with personal domains.
I'm surprised that you can even use a .htaccess file for any kind of redirect on a ISP personal site. I'm certainly not surprised that mod_rewrite does not work.
Have you considered a meta refresh? I don't know much about them, and normally would not raise the question. In your situation, I think I might look into that as a possible option.
Bernard
26-06-2007, 10:28/10:28AM
Hi Connie,
Yes, I tried contacting TW/Comcast several times. The right hand doesn't know what the left hand is doing. All I get in response is "corporate hasn't announced any decision on the PWPs".
A meta refresh does not accomplish the end goal and PHP is not available on the RR server.
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.