Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经在我的网站上成功应用了 IIS 规则(强制小写 URL),但现在我遇到了一个问题,我们的一个文件 combres.axd 停止加载。我尝试应用我在stackoverflow上找到的其他方式,但还没有成功。请建议如何解决此问题。
您可以尝试以下规则将 URL 更改为小写:
<rule name="LowerCaseRule"> <match url="[A-Z]" ignoreCase="false"/> <action type="Redirect" url="{ToLower:{URL}}"/> </rule>
结果如下:
失败的请求追踪结果:
如果您仍然遇到问题,您可以在 iis 中运行失败的请求跟踪,并检查 URL 给您 404 错误的原因。另一件事确保文件存在于具有相同路径和名称的位置。
https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules