Last active
August 29, 2015 14:05
-
-
Save freekrai/98adcad8fb3029c78357 to your computer and use it in GitHub Desktop.
Add rewrite capabilites to PHP 5.4's built-in web server
This file contains 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 | |
// php -S localhost:8888 routing.php | |
if (preg_match('/\.(?:png|jpg|jpeg|gif|css|js)$/', $_SERVER["REQUEST_URI"])) { | |
return false; | |
} else { | |
include __DIR__ . '/index.php'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment