From 73d6be273e8832134a32aaa031fd15623f29c6d2 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sat, 22 Nov 2025 19:03:36 +0100 Subject: [PATCH] Page/Selector * don't just cast the page call to lowercase but redirect to the fixed case if necessary --- index.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 672173b2..76f2819f 100644 --- a/index.php +++ b/index.php @@ -13,9 +13,15 @@ $pageParam = ''; parse_str(parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY), $query); foreach ($query as $page => $param) { - $page = preg_replace('/[^\w\-]/i', '', $page); + // fix page calls - pages like saerch use the page call directly and expect it as lower case + if (preg_match('/[A-Z]/', $page)) + { + $url = str_replace('?'.$page.'=', '?'.Util::lower($page).'=', $_SERVER['REQUEST_URI']); + header('Location: '.$url, true, 302); + exit; + } - $pageCall = Util::lower($page); + $pageCall = preg_replace('/[^\w\-]/i', '', $page); $pageParam = $param ?? ''; break; // only use first k/v-pair to determine page }