我在我的.htaccess 和标题(“HTTP/1.0 404 Not Found”)中有RewriteRule /sfilefile.php index.php [L];在我的index.php。 但404不工作,我得到空白页。为什么?mod_rewrite和php 404
header(“HTTP/1.0 404 Not Found”);没有htaccess文件。
不要问我为什么要这样做。 :D
我在我的.htaccess 和标题(“HTTP/1.0 404 Not Found”)中有RewriteRule /sfilefile.php index.php [L];在我的index.php。 但404不工作,我得到空白页。为什么?mod_rewrite和php 404
header(“HTTP/1.0 404 Not Found”);没有htaccess文件。
不要问我为什么要这样做。 :D
phpinfo我有服务器API CGI/FastCGI。 和我发现这个头(“状态:404找不到”)只能在IE中工作。在Chrome/Firefox中,我只看到空白页面。 某些浏览器也显示自定义错误消息,如果它们不超过256或512个字符
可能你的php是fastcgi,那么你需要做header("Status: 404 Not Found")
来代替。或者您的头文件已经发送,在这种情况下,您可能需要为php设置输出缓冲。并检查您的日志;-)
它不起作用。 – iamart 2012-07-17 19:14:28
两者都不起作用? – 2012-07-17 19:15:31
是的,他们都是 – iamart 2012-07-17 20:04:24