Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- 301 redirect best practice


kellyman - 9:52 pm on Sep 6, 2012 (gmt 0)


Hi Lucy

I don't have direct access to the logs, i can request them and have a look, and report back.

Going back to my original question though with this on the old server

RewriteEngine on
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

and this on the new server (thanks to g1smd) who supplied this for me

# 31 - Redirect index requests on new server
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index(\.(php|html?))?
RewriteRule ^(([^/]+/)*)index(\.(php|html?))?$ http://www.example.com/$1? [R=301,L]

# 32 - Redirect .php requests to extensionless URL
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(([^/]+/)*[^/.]+)\.php
RewriteRule ^(([^/]+/)*[^/.]+)\.php$ http://www.example.com/$1? [R=301,L]

# 33 - Redirect non-canonical requests to www
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]


Is the correct way to fully redirect by 301 a site i have renamed.

Is there any errors that could possible cause a problem

BTW prior to me changing names my site was a PR4 DA of 62 and a PA of 68

currently home page is a shadow of those figures , and im not trying to replicate those however i don't think what i have at present is currently working as intended and being this my money site i am desperate to get some kind of normality back

really appreciate all the feedback and advice you guys have given.


Thread source:: http://www.webmasterworld.com/apache/4491893.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com