我正在尝试重写来自的查询
http://example.com/login?service=http%3a%2f%2fsome.website.com%2f
到
http://example.com/authservice/login?service=http://some.website.com/
也就是说,在将URL编码的查询字符串传递到authservice路径下的新页面之前,先对其进行解码(我对此没有选择)。
我当前的规则是:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} service
RewriteRule ^/(login.*) /authservice/$1 [NE,R=302]
LogLevel alert rewrite:trace6
</IfModule>
我知道NE标志可以防止双重编码,但是我找不到找到对查询字符串进行解码的方法。
预先感谢