From 27818494dca469e96709fd9c54ba8f8461d88714 Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 5 Sep 2006 03:31:28 +0000 Subject: --- system/libraries/Router.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'system/libraries/Router.php') diff --git a/system/libraries/Router.php b/system/libraries/Router.php index c7e855a78..de1a6e9a8 100644 --- a/system/libraries/Router.php +++ b/system/libraries/Router.php @@ -239,8 +239,14 @@ class CI_Router { { $this->set_class($this->default_controller); $this->set_method('index'); - $this->directory = ''; - return array(); + + // Does the default controller exist in the sub-folder? + if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$this->default_controller.EXT)) + { + $this->directory = ''; + return array(); + } + } return $segments; -- cgit v1.2.3-24-g4f1b