【发布时间】:2017-03-07 04:05:39
【问题描述】:
如果 http 状态代码为 404,我正在尝试将 Azure 中的 Web 应用程序配置为重定向到 html 页面。这是 Azure 中的静态 html 站点。我添加了包含这些内容的 web.config 和 ApplicationHost.xdt 文件,但它什么也没做:
<system.webServer>
<httpErrors errorMode="Custom" existingResponse="Auto" defaultResponseMode="ExecuteURL" >
<remove statusCode="404"/>
<error statusCode="404" responseMode="ExecuteURL" path="http://www.website.com/404/index.html" />
</httpErrors>
进行这些更改后,我重新启动了网络应用程序,但它没有做任何事情。
【问题讨论】:
标签: azure iis web-config http-status-code-404 azure-web-app-service