<?php
$urls =
[
    "" => "https://pathogenstudios.com/",
    "bth" => "https://pathogenstudios.com/backtoher/",
];

$urlId = "";

if (isset($_GET["url"]))
{
    $urlId = $_GET["url"];
}

if ($urlId == "blog")
{
    echo("Down for maintenance, will be back up soon!<br><br>For now, find me on <a href=\"https://twitter.com/pathogendavid\">Twitter</a>!");
    exit;
}

if (!isset($urls[$urlId]))
{
    http_response_code(404);
    die("Unknown URL '" . $urlId . "'");
}

$destination = $urls[$urlId];

header("Location: " . $destination, true, 301);
exit;
?>
