看网上很多文章介绍的方法,实际上都是返回 200,怎么才能返回 404呢,看了下dismall.com 就能返回 404
帖子删除,返回404的解决方法:文件位置:source\module\forum\forum_viewthread.php,第26行: if(!$_G['forum_thread'] || !$_G['forum']) { showmessage('thread_nonexistence');}修改为: if(!$_G['forum_thread'] || !$_G['forum']) { header('HTTP/1.1 404 Not Found'); header('status: 404 Not Found'); include("404/index.html"); exit();}
我知道答案
回答被采纳将会获得 5 金币 + 10 金币 已有14人回答
|