diff --git a/views/home.php b/views/home.php index e9cda6a..a326e6d 100644 --- a/views/home.php +++ b/views/home.php @@ -24,9 +24,11 @@ $title = "Timeline for ".$title; // Redirect guests to Profile view, if url not set til home twtxt.txt -if (!isset($_SESSION['password']) && ($_GET['url'] != $config['public_txt_url']) ) { - header('Location: ./profile'); - exit(); +if (!isset($_SESSION['password']) && (isset($_GET['url']))) { + if ($_GET['url'] != $config['public_txt_url']) { + header('Location: ./profile'); + exit(); + } } include_once 'partials/header.php'; @@ -43,4 +45,4 @@ if (isset($_SESSION['password'])) { include_once 'partials/timeline.php'; -include_once 'partials/footer.php'; \ No newline at end of file +include_once 'partials/footer.php';