Charakterverwalter (westreiche_website) ergänzen, Website-Nav "Charaktere"
This commit is contained in:
parent
d107f90c93
commit
01dae01c7c
84 changed files with 8915 additions and 17 deletions
32
westreiche_website/index.php
Normal file
32
westreiche_website/index.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Westreiche – Front Controller.
|
||||
*
|
||||
* Die .htaccess im Wurzelverzeichnis leitet alle Anfragen, die keine Datei
|
||||
* treffen, hierher. app/, views/, sql/ und storage/ sind gesperrt.
|
||||
*/
|
||||
|
||||
require __DIR__ . '/app/bootstrap.php';
|
||||
|
||||
$uriPath = (string) parse_url((string) ($_SERVER['REQUEST_URI'] ?? '/'), PHP_URL_PATH);
|
||||
$basePath = rtrim((string) config('app.base_path', ''), '/');
|
||||
if ($basePath !== '' && str_starts_with($uriPath, $basePath)) {
|
||||
$uriPath = substr($uriPath, strlen($basePath));
|
||||
}
|
||||
$path = '/' . trim($uriPath, '/');
|
||||
$method = request_method();
|
||||
|
||||
// HEAD (z. B. curl -I) wie GET beantworten, nur ohne Rumpf.
|
||||
if ($method === 'HEAD') {
|
||||
$method = 'GET';
|
||||
ob_start();
|
||||
register_shutdown_function(static function (): void {
|
||||
while (ob_get_level() > 0) {
|
||||
ob_end_clean();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
page_handle($method, $path);
|
||||
Loading…
Add table
Add a link
Reference in a new issue