10 lines
358 B
PHP
10 lines
358 B
PHP
<?php
|
|
// Prüfe, ob die Datei oder das Verzeichnis existiert
|
|
if (file_exists(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) {
|
|
return false; // Liefere die Datei direkt aus
|
|
}
|
|
|
|
// Alle anderen Anfragen an api.php weiterleiten
|
|
$_GET['endpoint'] = trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/');
|
|
require_once __DIR__ . '/api.php';
|