X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/714373870efc4f371ace2d324530a2354a696da7..2013f7a1c3ef61a66f5b158823d19c8e6ade8886:/page.php diff --git a/page.php b/page.php index 35a810a..a9607c0 100644 --- a/page.php +++ b/page.php @@ -16,9 +16,7 @@ $staticpage = "$request.html"; if (file_exists($staticpage)) { if (is_link($staticpage)) { $target = preg_replace('/\.html$/', '', readlink($staticpage)); - header("HTTP/1.1 302 Shorthand"); - header("Location: $target"); - exit; + abort($target, '302 Shorthand'); } } elseif (file_exists("$request/index.html")) { @@ -35,10 +33,8 @@ include_once 'auth.inc.php'; // sets global $User if ($Page->restricted) { # access restriction if (!$User->login) { - http_response_code(303); $target = urlencode($Page->link); - header("Location: /login?goto=$target"); - exit; + abort("/login?goto=$target", '303 Eerst inloggen'); } }