diff options
Diffstat (limited to 'routes/homepage.php')
| -rw-r--r-- | routes/homepage.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/routes/homepage.php b/routes/homepage.php index 5fbc102..94fe4c9 100644 --- a/routes/homepage.php +++ b/routes/homepage.php @@ -1,12 +1,12 @@ <?php +use Digitigrade\HttpResponseStatus\NotFound; +use Digitigrade\HttpResponseStatus\TemporaryRedirect; use Digitigrade\Router; Router::getInstance()->mount('/', function (array $args) { - echo '<h1>home</h1>'; -}); - -Router::getInstance()->mount('/:username', function (array $args) { ?> - <h1><?= $args['username'] ?></h1> - <p>todo!</p> -<?php });
\ No newline at end of file + if (str_contains($_SERVER['HTTP_ACCEPT'] ?? '', 'text/html')) { + throw new TemporaryRedirect(path_to_uri('/feed/global')); + } + throw new NotFound(); +});
\ No newline at end of file |
