如何使用Apache RewriteRule正确解码URL编码的查询字符串?

我正在尝试重写来自的查询

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标志可以防止双重编码,但是我找不到找到对查询字符串进行解码的方法。

预先感谢

liuqingshuai113 回答:如何使用Apache RewriteRule正确解码URL编码的查询字符串?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3078745.html

大家都在问