Created
September 30, 2016 15:08
-
-
Save paulirwin/d08dd528f2068053a11bd53d4629c8d8 to your computer and use it in GitHub Desktop.
CodeIgniter URL Suffix support for PHP Built-in Web Server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); | |
} |
Thank you!
Great! Thank you.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Little script best advantage!