summaryrefslogtreecommitdiffstats
path: root/system/core/URI.php
diff options
context:
space:
mode:
authorericbarnes@ericbarnes.local <ericbarnes@ericbarnes.local>2011-02-03 04:40:36 +0100
committerericbarnes@ericbarnes.local <ericbarnes@ericbarnes.local>2011-02-03 04:40:36 +0100
commite58199ba6de5622a062536ba03c43700b70716ac (patch)
tree58668f7066736ff88920fb77bde917e097649ba3 /system/core/URI.php
parent5fd02675ed3d079c2719374b890fac599a2ef991 (diff)
Fixes #27. When the default controller was used, the _detect_uri() method was returning an incorrect URI, which caused a 404 when a query string was used and no controller specified. via Dan Horrigan
Diffstat (limited to 'system/core/URI.php')
-rw-r--r--system/core/URI.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/core/URI.php b/system/core/URI.php
index 1b479e92a..c43cde005 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -173,6 +173,12 @@ class CI_URI {
$_SERVER['QUERY_STRING'] = '';
$_GET = array();
}
+
+ if ($uri == '/' || empty($uri))
+ {
+ return '/';
+ }
+
$uri = parse_url($uri, PHP_URL_PATH);
// Do some final cleaning of the URI and return it