[英]Application Request Routing (ARR) IIS 7 Spaces in URL
I am using AAR to reverse proxy requests to a Confluence install. 我正在使用AAR将代理请求转发到Confluence安装。 This works fine when the URL contains no spaces.
当URL不包含空格时,这可以正常工作。 As soon as a space is added to the URL the request returns a 404, the 404 seems to originate from IIS not the Confluence instance.
只要向URL添加空格,请求就会返回404,404似乎来自IIS而不是Confluence实例。
I have enable Failed Request Tracing as detailed here: http://learn.iis.net/page.aspx/488/using-failed-request-tracing-rules-to-troubleshoot-application-request-routing-arr/ 我在此处详细说明了启用失败请求跟踪: http : //learn.iis.net/page.aspx/488/using-failed-request-tracing-rules-to-troubleshoot-application-request-routing-arr/
On requests that return the 404 the AAR module does not seem to kick in, there is no information about it in the logs. 在返回404的请求中,AAR模块似乎没有启动,日志中没有关于它的信息。 I have tested this against pages that return 200 and I can see the rewrite works correctly.
我已经对返回200的页面进行了测试,我可以看到重写正常。
Why is AAR not processing URLs with spaces in them? 为什么AAR不处理包含空格的URL? My Reverse Proxy rule matches on everything:
我的反向代理规则匹配所有内容:
(.*)
And I have no conditions applied to the rule. 我没有条件适用于该规则。
You need to allow double escaping. 你需要允许双重逃逸。
Go to IIS -> Pick your server node -> Request filtering -> Edit Feature Settings... -> Tick 'Allow double escaping' 转到IIS - >选择您的服务器节点 - >请求过滤 - >编辑功能设置... - >勾选'允许双重转义'
This solves your problem with Confluence and spaces in URLs. 这解决了Confluence和URL中的空格问题。
You could also use the command line 您也可以使用命令行
%windir%\\system32\\inetsrv\\appcmd set config "Default Web Site" -section:system.webServer/security/requestfiltering -allowDoubleEscaping:true %windir%\\ system32 \\ inetsrv \\ appcmd set config“默认网站”-section:system.webServer / security / requestfiltering -allowDoubleEscaping:true
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.