Commit 2289ec57 authored by lphuberdeau's avatar lphuberdeau

[FIX] Support more configurations

parent ffa69cee
......@@ -165,9 +165,17 @@ $inclusion = null;
switch ($sapi) {
case 'apache2handler':
default:
if (isset($_SERVER['SCRIPT_URL'])) {
$full = $_SERVER['SCRIPT_URL'];
} elseif ($_SERVER['REDIRECT_URL']) {
$full = $_SERVER['REDIRECT_URL'];
} else {
break;
}
$file = basename(__FILE__);
$base = substr($_SERVER['PHP_SELF'], 0, -strlen($file));
$path = substr($_SERVER['SCRIPT_URL'], strlen($base));
$path = substr($full, strlen($base));
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment