summaryrefslogtreecommitdiffstats
path: root/system/core/Router.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/core/Router.php')
-rwxr-xr-xsystem/core/Router.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/system/core/Router.php b/system/core/Router.php
index b5c200214..fe9909b06 100755
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -50,35 +50,35 @@ class CI_Router {
*
* @var array
*/
- public $routes = array();
+ public $routes = array();
/**
* List of error routes
*
* @var array
*/
- public $error_routes = array();
+ public $error_routes = array();
/**
* Current class name
*
* @var string
*/
- public $class = '';
+ public $class = '';
/**
* Current method name
*
* @var string
*/
- public $method = 'index';
+ public $method = 'index';
/**
* Sub-directory that contains the requested controller class
*
* @var string
*/
- public $directory = '';
+ public $directory = '';
/**
* Default controller (and method if specific)
@@ -242,9 +242,12 @@ class CI_Router {
$segments[1] = 'index';
}
+ // This is being routed to a file in a sub directory
+ $this->directory and array_unshift($segments, trim($this->directory, '/'));
+
// Update our "routed" segment array to contain the segments.
// Note: If there is no custom routing, this array will be
- // identical to $this->uri->segments
+ // identical to $this->uri->segments
$this->uri->rsegments = $segments;
}