Skip to content

Commit

Permalink
Merge pull request #841 from natanfelles/php_server
Browse files Browse the repository at this point in the history
Set CI_ENVIRONMENT before return false if REQUEST_URI is /index.php
  • Loading branch information
lonnieezell authored Nov 25, 2017
2 parents a0bca85 + fcce6ff commit 8f2175e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions rewrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,'/');
Expand All @@ -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';

0 comments on commit 8f2175e

Please sign in to comment.