Home > Backend Development > PHP Tutorial > apache 怎么把“403 - 禁止”改成“404 - Not Found”响应状态

apache 怎么把“403 - 禁止”改成“404 - Not Found”响应状态

WBOY
Release: 2016-06-13 11:59:54
Original
1588 people have browsed it

apache 如何把“403 - 禁止”改成“404 - Not Found”响应状态

就是http403禁止访问,改成http404 没发现

不报403,所有403的错误都报成404.。。。。。。。。。。

谢谢

在哪里改 ?
------解决方案--------------------
指派 404 可以这样
ErrorDocument 404 /404.php
同理,指派 403 也可以这样
ErrorDocument 403 /404.php
------解决方案--------------------
其實就是當服務器判斷是403時,顯示出404的錯誤頁面。
樓上的方法可行,你也可以自己做一個 404的頁面,不用系統的。
例如:ErrorDocument 403 /my404.php

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template