Problems with mod_rewrite and 301 redirects from one dynamic url to another

Posted by user349891 on Stack Overflow See other posts from Stack Overflow or by user349891
Published on 2010-05-25T12:29:18Z Indexed on 2010/05/25 12:31 UTC
Read the original article Hit count: 212

Filed under:
|
|

Hey all, I'm having all kinds of problems with a bunch of apache redirects just now and could really use some help!

I'm wating to put in a 301 redirect for a load of urls from a client's old site to their new site in the following format;

Old - page.php?pageNum_rs_all=0&totalRows_rs_all=112
New - page/sub?foo=bar

The values in the query sting for the old site don't in any way tie up to any ids or references on the new site, I only want to match that specific request and redirect to the new page.

It feels like I've tried just about every combination of rewriterule I can find online but still nothing seems to be working. This is running on Apache 2.2.

The rule I started with (and keep going back to) is;

RewriteRule ^/page.php\?pageNum_rs_all=0&totalRows_rs_all=112 /page/sub?foo=bar [R=301,L,NE]

Any help would be greatly appreciated!

c.

© Stack Overflow or respective owner

Related posts about apache

Related posts about mod-rewrite