Ctrl K
ComunidadGuías…

index.php

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
<?php

$suffix = explode('.', $_SERVER['REQUEST_URI']);
if (count($suffix) > 1) {
    $suffix = $suffix[count($suffix) - 1];
    if (in_array($suffix, ['jpg', 'js', 'css', 'png'])) {
        header('HTTP/1.0 404 Not Found');
        die();
    }
}

$newUrl = str_replace('index.php', 'web/', $_SERVER['SCRIPT_NAME']);
Header('Location: ' . $newUrl);