重定向到自定义错误页面 [英] Redirecting to custom error page

查看:307
本文介绍了重定向到自定义错误页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循了此 指南 并且我能够显示自定义错误页面.但是它将仅使用custerr/zh-cn文件夹中的404.htm文件.我想检查如何更改404和通用错误页面?

i have follow this guide and i am able to get the custom error page to appear. but it will only use the 404.htm file in the custerr/en-us folder. i would like to check how do i change the 404 and the generic error page?

我尝试在IIS错误页面模块中更改404页面,但更改了相对文件路径"部分

i tried changing the 404 page in IIS Error Pages module but changing the Relative File path section

发生404错误时,我收到了以下错误

when a 404 error happen i received the following error instead

保存后,web.config看起来像这样

the web.config looks like this after saving

<httpErrors errorMode="Custom" existingResponse="Auto">
     <remove statusCode="404" subStatusCode="-1" />
     <error statusCode="404" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="my404Error.htm" responseMode="File" />
</httpErrors>

推荐答案

请检查红色错误消息并加以解决.

Please check the red error message and fix that.


这篇关于重定向到自定义错误页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆