diff --git a/include/constants.php b/include/constants.php index 5aa5bc87a..6f04ffb18 100644 --- a/include/constants.php +++ b/include/constants.php @@ -1,5 +1,5 @@ getScript() == 'ajax') { exit(fail('Not login!', $_POST)); } - if ($mainpage) - header("Location: " . get_protocol_prefix() . "$BASEURL/login.php"); - else { + if ($mainpage) { + nexus_redirect("login.php"); + } else { $to = $_SERVER["REQUEST_URI"]; $to = basename($to); - header("Location: " . get_protocol_prefix() . "$BASEURL/login.php?returnto=" . rawurlencode($to)); + nexus_redirect("login.php?returnto=" . rawurlencode($to)); } exit(); }