【发布时间】:2011-09-10 05:28:39
【问题描述】:
在虚拟主机配置文件中使用此规则会导致查询参数的双重转义:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
例如:
http://example.com?f=hello%20world
导致
https://example.com?f=hello%2520world
注意转义“%”符号的“%25”。为什么会这样?
【问题讨论】:
标签: apache mod-rewrite query-string