Forum Moderators: phranque
http://mydomain.com/dir/?code
and change it to this:
http://mydomain.com/dir/
What I've discovered so far is that RewriteRule doesn't seem to be able to match a question mark, even if I'm careful to escape it with a slash -- /?. I tried:
RewriteCond %{QUERY_STRING}!^$
RewriteRule .* %{REQUEST_URI} [R,L]
I hoped that REQUEST_URI wouldn't include the query string, but apparently it does. And I get a "too many redirects" error when I use that code.
It'll probably be obvious when I see the answer....
RewriteCond %{QUERY_STRING} .
RewriteRule (.*) http://www.example.com/$1? [R=301,L]
Jim