28 lines
1.0 KiB
PHP
28 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Foundation\Application;
|
|
use Illuminate\Http\Request;
|
|
|
|
define('LARAVEL_START', microtime(true));
|
|
|
|
// Determine if the application is in maintenance mode...
|
|
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
|
|
require $maintenance;
|
|
}
|
|
|
|
// Register the Composer autoloader...
|
|
require __DIR__.'/../vendor/autoload.php';
|
|
|
|
// Strato: the domain points at the deployment folder and .htaccess forwards to releases/<version>/public.
|
|
// The script then lives below that path, so the base URL would contain it and signed links would not
|
|
// match. The site is always served from the domain root, therefore the script is reported as /index.php.
|
|
if (preg_match('~/(releases/[^/]+|current)/public/index\.php$~', $_SERVER['SCRIPT_NAME'] ?? '')) {
|
|
$_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'] = '/index.php';
|
|
}
|
|
|
|
// Bootstrap Laravel and handle the request...
|
|
/** @var Application $app */
|
|
$app = require_once __DIR__.'/../bootstrap/app.php';
|
|
|
|
$app->handleRequest(Request::capture());
|