I have a set of pages that I'm trying to redirect to new URLs. They have different query strings in the destination URL than in the source URL.
http://localhost/people.php?who=a
should be redirected to:
http://localhost/people/?t=leadership
And further and further ...
I have the following set of rewrite rules and I am obviously doing something very wrong.
RewriteRule ^people.php?who=a /people/?t=leadership [R=301,L] RewriteRule ^people.php?who=f /people/?t=faculty [R=301,L] RewriteRule ^people.php?who=p /people/?t=students [R=301,L] RewriteRule ^people.php?who=r /people/ [R=301,L] RewriteRule ^people.php /people/ [R=301,L]
What happens is that the first 4 rules do not match, and the page is redirected to:
http://localhost/people/?who=a
I tried the QSD flag, but it seems my problem is that the rule does not match in the entire query string, and not because it passes the query string.
redirect apache .htaccess mod-rewrite
isabisa
source share