<?php
declare(strict_types=1);

require __DIR__ . '/lib/content.php';

if (function_exists('header_remove')) {
    header_remove('X-Powered-By');
}
@ini_set('expose_php', '0');

// Soft-404 guard: nginx may fall through unknown URLs to /index.php while keeping REQUEST_URI.
$reqPath = (string) (parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH) ?: '/');
$reqPath = rawurldecode($reqPath);
$reqNorm = '/' . trim($reqPath, '/');
if ($reqNorm === '/index.php') {
    $reqNorm = '/';
}
if ($reqNorm !== '/') {
    require __DIR__ . '/404.php';
    exit;
}

require __DIR__ . '/lib/home-page.php';
