diff options
Diffstat (limited to 'system/core/Router.php')
-rw-r--r-- | system/core/Router.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/system/core/Router.php b/system/core/Router.php index 6893e6e92..005e81748 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -87,7 +87,15 @@ class CI_Router { } // Load the routes.php file. - @include(APPPATH.'config/routes'.EXT); + + if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/routes'.EXT)) + { + @include(APPPATH.'config/'.ENVIRONMENT.'/routes'.EXT); + } + else + { + @include(APPPATH.'config/routes'.EXT); + } $this->routes = ( ! isset($route) OR ! is_array($route)) ? array() : $route; unset($route); |