重定向到Azure应用程序中的自定义错误页面,从未工作
我试图将HTTP错误重定向到外部URL中托管的错误页面,利用元素< httperrors>
在服务器中的Web.config文件中。
目前,我具有以下配置
<configuration>
<system.webServer>
<httpErrors errorMode="Custom" defaultResponseMode="Redirect">
<error statusCode="404" path="https://my-custom-error-page.com" />
</httpErrors>
...
,无论我设置为 defaultresponsemode ,我都无法获取错误页面,相反,我仍在检索IIS错误页面。
有人知道缺少什么吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
web.config
已在wwwroot Directory中部署在wwwroot Directorycode> custom> customeror
page with Thens inter Inster设置在web.config
中,当错误&lt; System.webserver&gt;
下发生错误时,请确保wwwroot
文件夹中 文件夹名为public并添加了error.html页面。在web.config中给出相同的路径/public/404.html
web.config
is deployed in the wwwroot directoryCustomError
page with the below setting inweb.config
when an error occurs<system.webServer>
, Make sure you addwwwroot
folder created one folder named public and added the error.html page. Give the same path/public/404.html
in web.config