From fcce6ff40c167197793dc78f5650519bc8e6e905 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Thu, 23 Nov 2017 19:08:45 -0200 Subject: [PATCH] Set CI_ENVIRONMENT before return false if uri is /index.php --- rewrite.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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';