changeset 88:4c88842414dd

Merged.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 09 Oct 2017 18:47:35 +0300
parents dcbebe8a5f97 (diff) 95781f84cbe7 (current diff)
children eb5b6db2b250
files
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/router.php	Mon Oct 09 18:47:12 2017 +0300
+++ b/router.php	Mon Oct 09 18:47:35 2017 +0300
@@ -1,10 +1,15 @@
 <?php
-// The hack to get this working on PHP 5.4 built-in web server
-// php -S localhost:8888 router.php
-// http://localhost:8888/
+//
+// 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)/", $_SERVER["REQUEST_URI"]))
-  return false;
+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";