diff --git a/engine/classes/Router.class.php b/engine/classes/Router.class.php index 1fd2f0f9..9f98b964 100644 --- a/engine/classes/Router.class.php +++ b/engine/classes/Router.class.php @@ -98,7 +98,7 @@ class Router extends Object { * @return string */ protected function GetRequestUri() { - $sReq=preg_replace("/\/+/",'/',$_SERVER['REQUEST_URI']); + $sReq=preg_replace("/\/+/",'/',str_replace(preg_replace("@/*index\.php@U",'',$_SERVER['PHP_SELF']),'',$_SERVER['REQUEST_URI'])); $sReq=preg_replace("/^\/(.*)\/?$/U",'\\1',$sReq); $sReq=preg_replace("/^(.*)\/\?.*$/U",'\\1',$sReq); diff --git a/install/index.php b/install/index.php index 3f1f628d..3f1f1181 100644 --- a/install/index.php +++ b/install/index.php @@ -1515,11 +1515,11 @@ class Install { } function GetPathRootWeb() { - return rtrim('http://'.$_SERVER['HTTP_HOST'],'/'); + return rtrim('http://'.$_SERVER['HTTP_HOST'],'/').str_replace('/install/index.php','',$_SERVER['PHP_SELF']); } function GetPathRootServer() { - return rtrim($_SERVER['DOCUMENT_ROOT'],'/'); + return rtrim(dirname(dirname(__FILE__)),'/'); } }