This commit is contained in:
2025-12-24 23:43:51 +01:00
parent b5971e2efd
commit e4e93b05f4

View File

@@ -19,14 +19,13 @@ if ($uriPath === '' || $uriPath === 'index' || $uriPath === 'index.php') {
$target = __DIR__ . '/page/index.php'; $target = __DIR__ . '/page/index.php';
} else { } else {
$base = __DIR__ . '/page/' . $uriPath; $base = __DIR__ . '/page/' . $uriPath;
echo $base;
// 1) Verzeichnis mit index.php // 1) Verzeichnis mit index.php
if (is_dir($base) && is_file($base . '/index.php')) { if (is_dir($base) && is_file($base . '/index.php')) {
$target = $base . '/index.php'; $target = $base . '/index.php';
} }
// 2) Datei // 2) Datei
elseif (is_file($base . '.php')) { elseif (is_file($base . '.php')) {
echo $base;
$target = $base . '.php'; $target = $base . '.php';
} }
// 3) 404 // 3) 404