我在 URL 重定向/重写期间收到 404,我无法确定是什么导致了它。
警告是:
REWRITE_DISABLED_KERNEL_CACHE
这是我的规则:
<rule name="TFS Redirect" stopProcessing="true">
<match url="^((?!tfs).)*$" />
<conditions>
<add input="{HTTP_HOST}" pattern="tfs.domain.com" />
</conditions>
<action type="Redirect" url="http://tfs.domain.com/tfs" />
</rule>
<rule name="TFS Rewrite" stopProcessing="true">
<match url="^tfs(.*)" />
<action type="Rewrite" url="http://server3:8080/{R:0}" />
</rule>
Run Code Online (Sandbox Code Playgroud)
重定向规则似乎有效,因为tfs.domain.com/tfs当我浏览到tfs.domain.com.
但是后来我得到了 404。我查看了失败的请求日志,但它们并没有透露太多信息。有这个问题,但恐怕我对讨论的意思完全不知所措。也许这就是我问题的解决方案,但我不知道他们在说什么。不幸的是,这超出了我的想象。
那么......是ARR警告导致404吗?如果没有,我怎样才能找到这个问题的根本原因?
紧凑视图
编号 事件名称 详细信息 时间 --- ------------------------------- ---------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ------------- ------------- 1. GENERAL_REQUEST_START SiteId="1", AppPoolId="DefaultAppPool", ConnId="1610612761", RawConnId="0", RequestURL="http://tfs.domain.com:80/favicon.ico", RequestVerb="获取”01:03:35.718 2. GENERAL_SET_REQUEST_HEADER HeaderName="AspFilterSessionId", HeaderValue="", Replace="true" 01:03:35.718 3. GENERAL_ENDPOINT_INFORMATION RemoteAddress="192.168.0.1", RemotePort="54278", LocalAddress="192.168.0.12", LocalPort="80" …