这不是我的确切的PHP,因为它很复杂,但它是相同的一般想法。PHP - 标题404不触发htaccess ErrorDocument
if($_GET['page'] == ".htaccess"){
header("HTTP/1.0 404 Not Found");
}
发生这种情况时,Apache不加载在.htaccess文件中设置的404页面。我知道404的作品,因为当我去一个不存在的页面,我得到指定的404页面。
有没有什么办法可以获得指定的404页面加载而无需手动转储404页面文件的内容?
相关问题一并输出它:http://stackoverflow.com/questions/5534268/headerhttp-1 -0-404-not-found-not-doing-anything – User 2014-08-16 02:29:02