RewriteCond for url with parameters RewriteCond for url with parameters apache apache

RewriteCond for url with parameters


Solved!

RewriteCond %{REQUEST_URI} ^/test.php [NC]RewriteCond %{QUERY_STRING} ^u=(.*)&id=(.*)&img=(.*)RewriteRule (.*) http://app.foo.com/%2-%1-%3.test? [R=301,L]

Placing a ? on the end of the RewriteRule removes previous query string information.


This works perfectly! I used this - but i'm wondering why the target url shows "%3f" at the end.

I'm using:

   RewriteCond %{REQUEST_URI} ^/ie/xx/yy.php [NC]   RewriteCond %{QUERY_STRING} ^rubric=(.*)&nr=(.*)   RewriteRule (.*) https://www.newdom.com/xx/yy.php?rubric=%1&nr=%2 [R=301,L]

Why is %3f at the end?