This project is read-only.
1
Vote

QSD/qsdiscard option not working

description

The QSD (querystring discard) option doesn't seem to be working. This is useful when migrating urls from the form Page.aspx?filter=Something to Page/Something

For example, for the following rules:
RewriteCond %{QUERY_STRING} filter=(.*)
RewriteRule ^/page.aspx$ /page/%1 [QSD,NC,R=301]

I would expect page.aspx?filter=something to be rewritten to:
page/something

However the current result is:
page/something?filter=something

The only workaround I have found so far to force the querystring to be dropped is to append an empty querystring onto the resulting URI, e.g.:
RewriteCond %{QUERY_STRING} filter=(.*)
RewriteRule ^/page.aspx$ /page/%1? [QSD,NC,R=301]

Resulting in:
page/something?

Which isn't as clean as I'd like.

comments

jao28 wrote Dec 13, 2014 at 12:11 AM

I have some code that patched this and will try to get it up on a pull request. Ping me directly if you are still in need.