无效页面的PHP重定向 [英] PHP redirections for invalid pages

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

问题描述

例如,你有一个php网站和一个名为index.php的主页,但是如果有任何一个类型到她的浏览器地址栏; www.example.index.php / z页面显示有一些错误(带有style.css)我想将用户重定向到example.com或者我想显示404错误消息,如果有人可以解释这个错误我会很高兴,我没有线索



感谢您的回复

Hi,for example you have a php website and a home page named as index.php but if any one types to her Browser address bar; www.example.index.php/z the page is displayed with some errors(with out style.css) I want to redirect the user to example.com or I want to show a 404 error messag,if some one can explain this error I will be happy,I dont have a clue

Thanks For Your reply

推荐答案

你应该是能够创建一个名为404.shtml的文件,该文件在生成404错误消息时加载。我正在研究你正在使用apache的事实,如果它仍然失败,那么你可以查看以下网站来解释错误捕获对这个Web服务器有效的方式



http://www.404-error-page .com [ ^ ]



/ Darren
You should be able to create a file called 404.shtml which is loaded when a 404 error message is generated. I'm working on the fact that you are using apache and if it still fails then you can look at the following site to explain the way the error catching works for this web server

http://www.404-error-page.com[^]

/Darren


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

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