From 07a03c38b3a14a898242d07ae20dd1eebcd8d46e Mon Sep 17 00:00:00 2001 From: slawkens Date: Mon, 6 Feb 2023 16:40:29 +0100 Subject: [PATCH] fix base dir detection --- system/router.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/router.php b/system/router.php index 5718f900..52be68e5 100644 --- a/system/router.php +++ b/system/router.php @@ -128,6 +128,11 @@ if (false !== $pos = strpos($uri, '?')) { } $uri = rawurldecode($uri); +if (BASE_DIR !== '') { + $tmp = str_replace_first('/', '', BASE_DIR); + $uri = str_replace_first($tmp . '/', '', $uri); +} + define('URI', $uri); $found = true;