Redirect for unsigned users

I keep getting a 404 error when I use this PHP code not sure why

if (!isset($_SESSION['isLoggedIn']) || !isset($_SESSION['isFirmxxpert'])) {
  // User is not logged in or not signed up, redirect to login page
  header('Location: https://firmxxperts.com/homepage.php');
  exit;
} else {
  // User is logged in and signed up, redirect to homepage
  header('Location: https://firmxxperts.com.php');
  exit;
}

Hi,

Unfortunately, this code is not HivePress specific, so we can’t provide more details. I recommend you to consider hiring someone on Fiverr or Upwork.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.