load config files from environment specific locations in core classes, helpers and libraries
diff --git a/system/core/Router.php b/system/core/Router.php
index 6893e6e..005e817 100644
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -87,7 +87,15 @@
}
// 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);