Skip to content

Instantly share code, notes, and snippets.

@Big-Shark
Last active August 29, 2015 14:10
Show Gist options
  • Save Big-Shark/ad3856b018f6c6e68993 to your computer and use it in GitHub Desktop.
Save Big-Shark/ad3856b018f6c6e68993 to your computer and use it in GitHub Desktop.
server.php
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$uri = urldecode($uri);
$requested = __DIR__.'/public'.$uri;
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
// built-in PHP web server. This provides a convenient way to test a Laravel
// application without having installed a "real" web server software here.
if ($uri !== '/' and file_exists($requested))
{
return false;
}
require_once __DIR__. '/public/index.php';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment