diff --git a/includes/core/urls.inc.php b/includes/core/urls.inc.php index 479fc1f..1ec0548 100644 --- a/includes/core/urls.inc.php +++ b/includes/core/urls.inc.php @@ -28,9 +28,8 @@ final class URLMapper public function fromPathInfo( ) { - if ( array_key_exists( 'PATH_INFO' , $_SERVER ) ) { - $path = $_SERVER[ 'PATH_INFO' ]; - } else { + $path = rtrim( preg_replace( '/\/\/+/g', '/', $_SERVER[ 'PATH_INFO' ] ?? '') , '/' ); + if ( !$path ) { $path = '/' . $this->package->config( $this->configBase . '/default' , 'home' ); }