Commit cd903fc0 authored by Taylor Otwell's avatar Taylor Otwell

tweaked uri determination.

parent e452bbdf
......@@ -53,7 +53,7 @@ class Request {
}
// -------------------------------------------------------
// Remove the application URL and any extra slashes.
// Remove the application URL.
// -------------------------------------------------------
$base_url = parse_url(Config::get('application.url'), PHP_URL_PATH);
......@@ -62,18 +62,18 @@ class Request {
$uri = (string) substr($uri, strlen($base_url));
}
$uri = trim($uri, '/');
// -------------------------------------------------------
// Remove the application index.
// Remove the application index and any extra slashes.
// -------------------------------------------------------
$index = Config::get('application.index');
if (strpos($uri, $index) === 0)
if (strpos($uri, '/'.$index) === 0)
{
$uri = (string) substr($uri, strlen($index));
$uri = (string) substr($uri, strlen('/'.$index));
}
$uri = trim($uri, '/');
// -------------------------------------------------------
// If the requests is to the root of the application, we
// always return a single forward slash.
......
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