<?php

if (strpos($_SERVER['REQUEST_URI'], 'index.php') !== FALSE) {
    $new_uri = preg_replace('#index\.php\/?#', '', $_SERVER['REQUEST_URI']);
    header('Location: ' . $new_uri, TRUE, 301);
    die();
}

use Illuminate\Http\Request;

define('LARAVEL_START', microtime(true));

// Determine if the application is in maintenance mode...
if (file_exists($maintenance = __DIR__.'/../../memberddi/storage/framework/maintenance.php')) {
    require $maintenance;
}

// Register the Composer autoloader...
require __DIR__.'/../../memberddi/vendor/autoload.php';

// Bootstrap Laravel and handle the request...
(require_once __DIR__.'/../../memberddi/bootstrap/app.php')
    ->handleRequest(Request::capture());
