Initial support for pseudo-static environment
This commit is contained in:
+4
-5
@@ -1,16 +1,15 @@
|
||||
<?php
|
||||
|
||||
require_once("./vendor/pathHandler/main.php");
|
||||
\pathHandler\redirect();
|
||||
|
||||
function getpath()
|
||||
{
|
||||
$_SERVER['firstacceptlanguage'] = strtolower(splitfirst(splitfirst($_SERVER['HTTP_ACCEPT_LANGUAGE'],';')[0],',')[0]);
|
||||
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
$_SERVER['base_path'] = path_format(substr($_SERVER['SCRIPT_NAME'], 0, -10) . '/');
|
||||
if (isset($_SERVER['UNENCODED_URL'])) $_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL'];
|
||||
$p = strpos($_SERVER['REQUEST_URI'],'?');
|
||||
if ($p>0) $path = substr($_SERVER['REQUEST_URI'], 0, $p);
|
||||
else $path = $_SERVER['REQUEST_URI'];
|
||||
$path = path_format( substr($path, strlen($_SERVER['base_path'])) );
|
||||
return $path;
|
||||
return \pathHandler\get(0);
|
||||
//return substr($path, 1);
|
||||
//return spurlencode($path, '/');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user