Mercurial > hg > batmud > alchtool
view router.php @ 86:dcbebe8a5f97
Bugfix.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 16 Apr 2015 20:54:09 +0300 |
parents | 5307abdc04c7 |
children |
line wrap: on
line source
<?php // // The hack to get this working on PHP 5.4 built-in web server, // simply run the following: // // $ php -S localhost:8888 router.php // // Then head your browser to http://localhost:8888/ // if (preg_match("/\/[a-z0-9_-]+\.(?:png|jpg|jpeg|gif|css|php|js|txt|ogg|mp3|ttf)/i", $_SERVER["REQUEST_URI"])) return false; // Serve the requested resource as-is. else { require_once "index.php"; return true; } ?>