Forum Moderators: Robert Charlton & goodroi
Thank you to all responders!
"A system is in place that allows the client to map old URLs with page rank to new system so as to not lose any existing page rank"
Now the business is saying this didnīt include 301 redirects. What system then? I really canīt afford to lose this existing traffic.
redirect 301 /olddirectory/oldfile.html http://example.com/newdirectory/newfile.html
redirect 301 /olddirectory/oldfile1.html http://example.com/newdirectory/newfile1.html
[edited by: Receptional_Andy at 3:32 pm (utc) on Sep. 24, 2008]
[edit reason] Please use example.com - it can never be owned [/edit]
RewriteRule ^old_page.php$ http://example.com/new_page.php [R=301,NC]
Sorry for asking such an amateur question but iīm learning this from scratch. I would also like to know why this is better than the previous code I pasted? Cheers.
[edited by: tedster at 8:34 pm (utc) on Sep. 24, 2008]
[edit reason] fix typo [/edit]
Is there some pattern to the naming in the URLs?
Like..
- the second word in the old URL is always the second word in the new URL.
- the folder name changes from this to that.
If there is, then the rules can be crafted such that one rule can be a redirect for hundreds or thousands of URLs.
Why should a webmaster use rewriterule (e.g.RewriteRule ^old_page.php$ http://example.com/new_page.php [R=301,NC]) instead of the easier redirect 301 (e.g.redirect 301 /olddirectory/oldfile.html http://example.com/newdirectory/newfile.html )? Thank you