I'm using something similar to the following in my .htaccess file to redirect all http requests to https:
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
That works, except for a situation when a URL is passed with escaped parameters, as such:
http://www.example.com/download.php?go=app%20name
when redirected, it is mistakenly escaped again into:
https://www.example.com/download.php?go=app%2520name
How do I fix this?