diff --git a/system/HTTP/SiteURIFactory.php b/system/HTTP/SiteURIFactory.php index 49ee3bf3ed73..fcf295c82b02 100644 --- a/system/HTTP/SiteURIFactory.php +++ b/system/HTTP/SiteURIFactory.php @@ -131,7 +131,7 @@ private function parseRequestURI(): string // Strip the SCRIPT_NAME path from the URI if ( - $path !== '' && isset($this->superglobals->server('SCRIPT_NAME')[0]) + $path !== '' && $this->superglobals->server('SCRIPT_NAME') !== '' && pathinfo($this->superglobals->server('SCRIPT_NAME'), PATHINFO_EXTENSION) === 'php' ) { // Compare each segment, dropping them until there is no match