diff --git a/check_login.php b/check_login.php index eeb6d4d4..297208c2 100644 --- a/check_login.php +++ b/check_login.php @@ -18,10 +18,11 @@ if (!isset($config_enable_setup) || $config_enable_setup == 1) { // Check user is logged in with a valid session if (!isset($_SESSION['logged']) || !$_SESSION['logged']) { - if($_SERVER["REQUEST_URI"] == "/") + if ($_SERVER["REQUEST_URI"] == "/") { header("Location: login.php"); - else + } else { header("Location: login.php?last_visited=" . base64_encode($_SERVER["REQUEST_URI"]) ); + } exit; }