diff options
Diffstat (limited to 'public')
| -rw-r--r-- | public/index.php | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/public/index.php b/public/index.php index 7e44159..1de542e 100644 --- a/public/index.php +++ b/public/index.php @@ -9,24 +9,21 @@ switch( $url ) { case("/"): echo $twig->render('index.html'); break; -case("/about"): +case("/about/"): echo $twig->render('about.html'); break; -case("/projects"): +case("/projects/"): echo $twig->render('projects.html'); break; -case("/tools"): +case("/tools/"): echo $twig->render('tools.html'); break; -case("/tools/faces"): case("/tools/faces/"): echo $twig->render('tools/faces/index.html', [ "faces" => get_faces() ]); break; -case("/tools/pizza"): case("/tools/pizza/"): echo $twig->render('tools/pizza/index.html'); break; -case("/tools/untrack"): case("/tools/untrack/"): $_url = ""; if ( isset($_REQUEST['url']) ) { @@ -34,11 +31,19 @@ case("/tools/untrack/"): } echo $twig->render('tools/untrack/index.html', [ "url" => $_url ]); break; -case("/tools/zeitumstellung"): case("/tools/zeitumstellung/"): echo $twig->render('tools/zeitumstellung/index.html', [ "tc" => new Zeitumstellung() ]); break; +case("/tools/tanz/"): + echo $twig->render('tools/bpm/index.html', [ "dances" => get_dances() ]); + break; default: - http_response_code(404); - echo $twig->render('404.html'); + if ( str_ends_with($url, "/") ) { + http_response_code(404); + echo $twig->render('404.html'); + } else { + $url = $url . "/"; + header("Location: " . $url); + exit; + } } |
