<?php

declare(strict_types=1);

$uri = urldecode((string) (parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH) ?? '/'));
$path = $uri === '' ? '/' : $uri;
$file = __DIR__ . $path;
if ($path !== '/' && is_file($file)) {
    return false;
}
header('Content-Type: text/html; charset=utf-8');
readfile(__DIR__ . '/index.html');
