Update Route.php
This commit is contained in:
parent
734111ad9d
commit
0019795655
@ -21,10 +21,14 @@ abstract class Route
|
||||
return $request_url_path;
|
||||
|
||||
$request_url_path = urldecode(strtok($_SERVER['REQUEST_URI'], '?'));
|
||||
if (str_starts_with($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME']))
|
||||
|
||||
if (str_starts_with($request_url_path, $_SERVER['SCRIPT_NAME']))
|
||||
$request_url_path = substr_replace(
|
||||
urldecode(strtok($_SERVER['REQUEST_URI'], '?')), '', 0, strlen($_SERVER['SCRIPT_NAME'])
|
||||
$request_url_path, '', 0, strlen($_SERVER['SCRIPT_NAME'])
|
||||
);
|
||||
|
||||
if ($request_url_path === dirname($_SERVER['SCRIPT_NAME']) . '/')
|
||||
$request_url_path = '/';
|
||||
|
||||
if ($request_url_path === '')
|
||||
$request_url_path = '/';
|
||||
|
Reference in New Issue
Block a user