From f6ea58ed96fc76eeb0439db3b7e1aea7d61b3bbb Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 11 Oct 2011 21:41:57 -0500 Subject: [PATCH] improve request uri detection. --- laravel/request.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/laravel/request.php b/laravel/request.php index 72e916a3..12a44e73 100644 --- a/laravel/request.php +++ b/laravel/request.php @@ -66,9 +66,11 @@ public static function uri() $uri = substr($uri, strlen($base)); } - if (strpos($uri, '/index.php') === 0) + $index = '/'.Config::$items['application']['index']; + + if (trim($index) !== '' and strpos($uri, $index) === 0) { - $uri = substr($uri, 10); + $uri = substr($uri, strlen($index)); } // Request URIs to the root of the application will be returned