Fix index.php redirecting infinitely if root is `/`
This commit is contained in:
parent
f5426ceac3
commit
0dc79bb9ad
|
@ -36,6 +36,7 @@ function startsWith($haystack, $needle) {
|
|||
|
||||
// determine relative request-path
|
||||
$root = dirname($_SERVER['PHP_SELF']);
|
||||
if ($root === "/") $root = "";
|
||||
$uriPath = $_SERVER['REQUEST_URI'];
|
||||
$path = substr($uriPath, strlen($root));
|
||||
|
||||
|
|
Loading…
Reference in New Issue