显示自定义禁止页面 [英] show custom forbidden page

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

问题描述





当用户尝试访问禁止的页面时,IIS显示

Hi,

with IIS when a user try to access forbidden pages, IIS shows

HTTP Error 403.14 - Forbidden





我可以将其重定向到我的自定义禁止页面吗?



Can i redirect that to my custom forbidden page?

推荐答案

使用Web配置文件的httpErrors部分并添加重定向页面

use the httpErrors section of the web config file and add the redirect page
<httpErrors>
       <error statusCode="403" path="/errors/403.htm" responseMode="ExecuteURL" />
</httpErrors>



refere:使用web.config返回自定义404和500错误 [ ^ ]


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

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