【发布时间】:2017-03-12 01:06:47
【问题描述】:
在我的web.config 文件中,我将此规则用于重定向到自定义 404 页面,它适用于确实不存在的 URL。
<system.webServer>
<httpErrors existingResponse="Auto" errorMode="Custom">
<remove statusCode="404" subStatusCode="-1"/>
<error statusCode="404" path="/CustomErrors.aspx" responseMode="ExecuteURL"/>
</httpErrors>
</system.webServer>
我的问题在于以 Point(.) 字符结尾的 URL。例如
http://192.168.1.151/login.
或者
http://192.168.1.151/login....
这会导致以下错误:
“/”应用程序中的服务器错误。
找不到资源。
StackOverFlow 很好地处理了这个问题: 404 page in stackoverflow
任何建议都会有所帮助。
【问题讨论】:
-
@PeterHahndorf 谢谢你,我在那个问题上写了一个答案。
标签: iis web-config http-status-code-404 custom-error-pages