Home  >  Article  >  Backend Development  >  哪位大神教我弄一下apache的404页面?

哪位大神教我弄一下apache的404页面?

WBOY
WBOYOriginal
2016-06-23 14:26:13834browse

本帖最后由 yudeidao 于 2013-10-31 22:22:28 编辑

apache

用的是phpnow,在网上找了,没有好的答案。我的网站是 穿衣打扮网 www.plqjnet.com,大家帮我看看啊。O(∩_∩)O谢谢了!

回复讨论(解决方案)

建立错误页面,如404.html,放根目录下或自定义位置

打开Apache配置文件(httpd.conf)

找到“ErrorDocument“那行,没有就新建一行
写入 ”ErrorDocument 404 /404.html”  (如果404.html不在根目录下请对路径也做相应更改)

重启Apache

主要就是在你的web服务器上配置

你们说的这些我都试过了,在电脑上输入错误链接不能跳转到我设置的404页面(比如输入http://www.plqjnet.com/1),是这样显示的。

但是我在手机上试过,可以。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn