diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Router.php | 10 |
1 files changed, 8 insertions, 2 deletions
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; |