server.php 519 Bytes
Newer Older
1 2 3 4
<?php

$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);

5 6
$uri = urldecode($uri);

7 8 9
$paths = require __DIR__.'/bootstrap/paths.php';

$requested = $paths['public'].$uri;
10 11 12 13 14 15 16 17 18

// 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;
}

19
require_once $paths['public'].'/index.php';