Reputation: 28800
I have the following mod_rewrite rule, which strips the .html extension from requests and replaces it with a trailing /
# Handle requests to pages ending with .html
RewriteCond %{REQUEST_URI} .*.html$
RewriteRule (.*).html$ $1/ [R=301,QSA,L]
I have discovered that if my query param contains a space, already encoded, the redirect is being re-encoded. So if the initial request is for "/search-results.html?q=some%20string", that gets rewritten to "/search-results/?q=some%2520string"
Is there another parameter I can give to mod_rewrite to prevent this re-encoding from happening?
Upvotes: 1
Views: 1104