Skip to content

Instantly share code, notes, and snippets.

@ivanfgm
Last active November 22, 2016 18:37
Show Gist options
  • Save ivanfgm/424ff71f3b2fe2fa480d8f740b21b326 to your computer and use it in GitHub Desktop.
Save ivanfgm/424ff71f3b2fe2fa480d8f740b21b326 to your computer and use it in GitHub Desktop.
Redirect to index in php built in server. taken from http://www.lornajane.net/posts/2012/php-5-4-built-in-webserver
<?php
if (file_exists(__DIR__ . '/' . $_SERVER['REQUEST_URI']))
return false;
include_once 'index.php';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment