我有一个虚拟主机设置为redirectntung-gitblit.localhost – > myserver:1279 。 但是,它不能使用正向编码的斜线( %2f )。 我试图访问的URL是,
http://ntung-gitblit.localhost/ABC%2fXYZ
如果没有AllowEncodedSlashes ,它会失败/error/HTTP_NOT_FOUND.html.var尝试访问服务器上的/error/HTTP_NOT_FOUND.html.var 。 将AllowEncodedSlashes设置为On导致以下内部URL匹配,
http://myserver:1279/ABC/XYZ
并将AllowEncodedSlashes设置为NoDecode结果在下面的URL被击中,
http://myserver:1279/ABC%252fXYZ
换句话说,它是过度逃避或逃避。 问题 :如何使它命中myserver:1279/ABC%2fXYZ ?
对不起,刚刚得到它(第三个答案在这里 ),解决scheme是在ProxyPass指令中使用nocanon ,
AllowEncodedSlashes On ProxyPass / http://myserver:1279/ nocanon
如果问题不再有用,我可以删除这个问题。