简体   繁体   English

应用程序请求路由(ARR)URL中的IIS 7空格

[英]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.

相关问题 在IIS中部署带有ARR的signalR(应用程序请求路由) - Deploying signalR with ARR in IIS (Application Request Routing ) IIS7.5应用程序请求路由(ARR)代理到多个端口 - IIS7.5 Application Request Routing (ARR) proxy to multiple ports IIS 重写/应用程序请求路由 (ARR) 半工作 - IIS Rewrite / Application Request Routing (ARR) Half-working 具有ARR(应用程序请求路由)的IdentityServer 4 - IdentityServer 4 with ARR (Application Request Routing) 通过ARR和URL重写了解iis路由 - Understanding iis routing with ARR and Url Rewrite 如何使用 iis arr 中的基于路径的路由为运行不同 iis 服务器的 2 个应用程序在 IIS 7.0 中配置应用程序请求路由 - How to configure Application Request Routing in IIS 7.0 for 2 applications running different iis servers using path based routing in iis arr 使用HTTP方法和Mule的应用程序请求路由(ARR) - Application Request Routing (ARR) with HTTP Methods and Mule IIS:在默认网站之外使用应用程序请求路由进行URL重写 - IIS: Use Application Request Routing for URL Rewrite outside of Default Website IIS ARR +请求筛选? - IIS ARR + Request Filtering? HttpContext.Session在应用程序请求路由(ARR)之后为null - HttpContext.Session is null behind Application Request Routing (ARR)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM