view router.php @ 84:7ec0ad742009

Rename directory.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 09 Mar 2015 10:11:04 +0200
parents e08f80b95910
children 5307abdc04c7
line wrap: on
line source

<?php
// The hack to get this working on PHP 5.4 built-in web server
// php -S localhost:8888 router.php
// http://localhost:8888/

if (preg_match("/\/[a-z0-9-_]+\.(?:png|jpg|jpeg|gif|css|php)/", $_SERVER["REQUEST_URI"]))
  return false;
else
{
  require_once "index.php";
  return true;
}
?>