重定向401"所需授权网页"自定义页面 [英] Redirect 401 "authorization required page" to custom page
本文介绍了重定向401"所需授权网页"自定义页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个简单的方法,我可以连接codea的在错误的前端PHP重定向到一个自定义页面?
Is there a simple way I can encode a front-end php redirect to a custom page upon error?
我在用一个.htaccess密码保护的目录页,但如果你取消该系统对话框或者输入了错误的信息,你会得到一个普通的HTML邮件中的浏览器,并具有导航回。
I have a page in a directory protected by an .htaccess password, but if you cancel the system dialog or enter the wrong details, you get a plain html message in the browser and have to navigate back.
将是巨大的,有自定义错误页作为解决这一点。
Would be great to have custom error pages as a solution to this.
谢谢!
推荐答案
在.htaccess文件,只需添加
In the .htaccess file, just add
ErrorDocument 401 /401.html
和改变401.html你想要显示的文件名。
And change 401.html to the name of the file you want to display.
这篇关于重定向401"所需授权网页"自定义页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文