Created
August 24, 2015 13:52
-
-
Save selfawaresoup/2e3c674aab0f85166a0f to your computer and use it in GitHub Desktop.
URL rewriting with exception for static files in PHP'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 | |
if (preg_match('/\.(?:png|jpg|jpeg|gif|js|css)$/', $_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