Forum Moderators: phranque

Message Too Old, No Replies

Specific 301 Redirects In Apache

I've redrected and redirectmatched what I need, what about the other pages?

         

sandpetra

6:49 pm on Nov 2, 2007 (gmt 0)

10+ Year Member



I've 301'd the pages I want to go to other pages on my new site from my old domain.

That's about 25 pages of a 100 page website. Each page goes to the new location on my new site. Is there a way to redirect all the rest of the pages, say to the new site home page, or do I need to set up rules for each page?

Also, some of the pages have different file names on the new server but virtually identical content. Will this affect the Google juice I'm trying to transfer or is the best way to keep the file names identical (which I cannot do)?

Any help much appreciated.

jdMorgan

2:09 pm on Nov 3, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you have a set of specific rewriterules for individual pages, each ending with the [L] flag, then any rule that follows them will be treated as an 'else' clause. That is, the final rule will never execute if any of the previous rules is executed.

So, it can be a simple as putting one more rule following all the rest.

See the Apache mod_rewrite documentation of the [L] flag on RewriteRule for more information.

Jim