diff --git a/rewrite.php b/rewrite.php index 3b8845b78c00..1ad69c1ca6c8 100644 --- a/rewrite.php +++ b/rewrite.php @@ -8,6 +8,10 @@ * functionality so the site will operate as normal. */ +// If we're serving the site locally, then we need +// to let the application know that we're in development mode +$_SERVER['CI_ENVIRONMENT'] = 'development'; + $uri = urldecode(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)); $path = __DIR__.'/public/'.ltrim($uri,'/'); @@ -21,9 +25,4 @@ // Otherwise, we'll load the index file and let // the framework handle the request from here. - -// If we're serving the site locally, then we need -// to let the application know that we're in development mode -$_SERVER['CI_ENVIRONMENT'] = 'development'; - require_once __DIR__.'/public/index.php';