if (isset($data['PATH_INFO']))
$url = $data['PATH_INFO'];
else
- $url = '/';
+ $url = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['DOCUMENT_URI']);
+
+ $this->request->data['HOPLITE_PATH_INFO'] = $url;
+
if ($url[0] == '/')
$url = substr($url, 1);
// Detect the common paths between the REQUEST_URI and the PATH_INFO. That
// common piece will be the path to the root controller.
$request_uri = $this->request()->data['_SERVER']['REQUEST_URI'];
- $path_info = $this->request()->data['_SERVER']['PATH_INFO'];
- if ($path_info === NULL)
+ $path_info = $this->request()->data['HOPLITE_PATH_INFO'];
+ if (!$path_info)
$common_uri = substr($request_uri, 0, -1);
else
$common_uri = strstr($request_uri, $path_info, TRUE);