Skip to content

Instantly share code, notes, and snippets.

@paulirwin
Created September 30, 2016 15:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulirwin/d08dd528f2068053a11bd53d4629c8d8 to your computer and use it in GitHub Desktop.
Save paulirwin/d08dd528f2068053a11bd53d4629c8d8 to your computer and use it in GitHub Desktop.
CodeIgniter URL Suffix support for PHP Built-in Web Server
<?php
if (file_exists(__DIR__ . '/' . $_SERVER['REQUEST_URI'])) {
return false; // serve the requested resource as-is.
} else {
// this is the important part!
$_SERVER['SCRIPT_NAME'] = '/index.php';
include_once (__DIR__ . '/index.php');
}
@fathonir
Copy link

fathonir commented Mar 1, 2018

Little script best advantage!

@sabith-mk
Copy link

Thank you!

@buzzricksons
Copy link

Great! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment