From ecd867748384843e70a61dac5e392b8f54a95127 Mon Sep 17 00:00:00 2001 From: Luffy <52o@qq52o.cn> Date: Thu, 22 Jan 2026 11:06:01 +0800 Subject: [PATCH] Add 404 status handling in manual lookup and results pages --- manual-lookup.php | 4 ++++ results.php | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/manual-lookup.php b/manual-lookup.php index 855267ba23..78b0eed38f 100644 --- a/manual-lookup.php +++ b/manual-lookup.php @@ -15,6 +15,10 @@ if (!empty($_GET['scope']) && is_string($_GET['scope'])) { $scope = htmlspecialchars($_GET['scope'], ENT_QUOTES, 'UTF-8'); + + if ($scope == '404quickref') { + status_header(404); + } } else { $scope = ''; } diff --git a/results.php b/results.php index a13f1d28b6..6cde699a26 100644 --- a/results.php +++ b/results.php @@ -3,6 +3,14 @@ $_SERVER['BASE_PAGE'] = 'results.php'; include __DIR__ . '/include/prepend.inc'; +if (!empty($_GET['p']) && is_string($_GET['p'])) { + $show = htmlspecialchars($_GET['p'], ENT_QUOTES, 'UTF-8'); + + if ($show == '404manual') { + status_header(404); + } +} + // HTTP status line is passed on, signifies an error site_header( 'Search results',