gpt4 book ai didi

iis-7 - 在IIS 7中为HTML页面设置自定义404页面

转载 作者:行者123 更新时间:2023-12-04 13:17:13 26 4
gpt4 key购买 nike

我的网站以.htm为扩展名,服务器为IIS7。我现在设计了自定义404页面。

现在任何人都可以建议我,如何通过web.config实现自定义404页面。

最佳答案

我也在IIS7(不是ASP,不是.NET)中的.htm页面上遇到了同样的问题。

我将responseMode替换为File而不是ExecuteURL中的<system.webServer>,并且一切正常:

<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404" />
<error statusCode="404" responseMode="File" path="error.htm" />
</httpErrors>

关于iis-7 - 在IIS 7中为HTML页面设置自定义404页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10345971/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com