求Nginx高手或伪静态高手
2021-01-30 17:39 来自 逝水年华 发布@ Discuz!问题求助
需要将类似adb.com/forum.php?mid=68057498088i0uFzBG/的链接跳转到404,或者伪静态处理,其中mid=后面的数字或数字与字母组合是随机的
关于删除或不存在的帖子返回 404
2022-10-11 22:09 来自 左右不逢缘 发布@ Discuz!问题求助
看网上很多文章介绍的方法,实际上都是返回 200,怎么才能返回 404呢,看了下dismall.com 就能返回 404
帖子删除,返回404的解决方法:文件位置:source\module\forum\forum_viewthread.php,第26行:
if(!$_G || !$_G) { showmessage('thread_nonexistence');}修改为:
if(!$_G || !$_G) { header('HTTP/1.1 404 Not Found'); header('status: 404 Not Found'); include("404/index.html"); exit();}
帖子删除,返回404的解决方法:文件位置:source\module\forum\forum_viewthread.php,第26行:
if(!$_G || !$_G) { showmessage('thread_nonexistence');}修改为:
if(!$_G || !$_G) { header('HTTP/1.1 404 Not Found'); header('status: 404 Not Found'); include("404/index.html"); exit();}



