This commit is contained in:
33333-33333 2026-08-11 21:51:07 +09:00
commit de7c6c32bd
123 changed files with 13201 additions and 6213 deletions

View file

@ -1,8 +1,8 @@
<?php
declare(strict_types=1);
// Router for PHP's built-in development server. Apache protects the legacy
// directory with .htaccess, but the built-in server ignores it completely.
// Router for PHP's built-in development server. Reject dot-prefixed path
// segments explicitly because the built-in server does not apply .htaccess.
$uri = rawurldecode((string)(parse_url((string)($_SERVER['REQUEST_URI'] ?? '/'), PHP_URL_PATH) ?: '/'));
$segments = array_values(array_filter(explode('/', str_replace('\\', '/', $uri)), static fn(string $part): bool => $part !== ''));
foreach ($segments as $segment) {