Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Advice needed about complex htaccess 301


lucy24 - 9:57 pm on Sep 19, 2011 (gmt 0)


Think of it as a cascade. Here I'm assuming you're adding www. (And, ahem, using a format that nobody could possibly mistake for cut-and-paste ;))

{olddomain}/{directory}/{page} -> {www.newdomain}/{directory}/{page}

Bye-bye to that page. Repeat as necessary for other pages, using pipes (page1|page2|page3) with $1 as appropriate.

{olddomain}/{directory} -> {www.newdomain}/{directory}

Bye-bye to that directory. Repeat as above. This step will only pick up the material that wasn't already dealt with in the previous step.

Finally sweep up the leftovers:

{olddomain} -> {www.newdomain}


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