Skip to content

Commit bfe9b54

Browse files
committed
Updated route base path.
1 parent 2e27cde commit bfe9b54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Router.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ public function pattern($pattern, $attr = null)
394394
*/
395395
public function run()
396396
{
397-
$base = str_replace('\\', '/', str_replace($this->documentRoot, '', $this->runningPath) . '/');
398-
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
397+
$base = str_replace('\\', '/', str_replace($this->documentRoot, '', $this->runningPath));
398+
$uri = rtrim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/');
399399
$uri = str_replace(dirname($_SERVER['PHP_SELF']), '', $uri);
400400

401401
if (($base !== $uri) && (substr($uri, -1) === '/')) {

0 commit comments

Comments
 (0)