mirror of
https://github.com/sigmasternchen/drnk.me
synced 2025-03-15 01:38:55 +00:00
14 lines
283 B
PHP
14 lines
283 B
PHP
<?php
|
|
|
|
require_once(ROOT . "/utils/error.php");
|
|
|
|
return function (array &$context) {
|
|
$path = substr($context[REQUEST_PATH], 1);
|
|
$url = $context[REPOSITORIES]->urls->getBySlug($path);
|
|
|
|
if (!$url) {
|
|
redirect("/");
|
|
} else {
|
|
redirect($url->url);
|
|
}
|
|
};
|