view router.php @ 89:eb5b6db2b250 default tip

Fixes.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 19 Oct 2017 17:42:05 +0300
parents dcbebe8a5f97
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;
}
?>