Files
hyprcrd/electron/router.php
T
2026-04-12 16:09:34 +02:00

10 lines
349 B
PHP

<?php
// Router for PHP's built-in server (replaces .htaccess rewrite rules).
// Static files are served directly; everything else goes to index.php.
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$file = __DIR__ . '/../public' . $path;
if ($path !== '/' && is_file($file)) {
return false;
}
require __DIR__ . '/../public/index.php';