SCRIPT_NAME instead of PHP_SELF to find self for niceurl test

This commit is contained in:
Shish 2020-03-27 19:03:46 +00:00
parent efde5e1edf
commit 5ea7cc5b36
2 changed files with 1 additions and 2 deletions

View file

@ -332,7 +332,7 @@ class Setup extends Extension
$host .= ":" . $_SERVER["SERVER_PORT"];
}
}
$full = "//" . $host . $_SERVER["PHP_SELF"];
$full = "//" . $host . $_SERVER["SCRIPT_NAME"];
$test_url = str_replace("/index.php", "/nicetest", $full);
$nicescript = "<script type='text/javascript'>

View file

@ -28,7 +28,6 @@ elseif (preg_match('/\.(?:png|jpg|jpeg|gif|css|js|php)(\?.*)?$/', $_SERVER["REQU
unset($matches);
// all other requests (use shimmie routing based on URL)
$_SERVER["PHP_SELF"] = '/index.php';
$_GET['q'] = explode("?", $_SERVER["REQUEST_URI"])[0];
error_log($_GET['q']); // if we use a custom handler, we need to do our own access log
require_once "index.php";