<?php

declare(strict_types=1);

$script = str_replace('\\', '/', (string) ($_SERVER['SCRIPT_NAME'] ?? '/download/index.php'));
$base = rtrim(dirname($script), '/');
$base = (string) preg_replace('#/download$#', '', $base);

header('Location: ' . ($base === '' ? '/install' : $base . '/install'), true, 302);
exit;
