header('Location: http://www.somewhereelse.com/'); // login page redirection if($user==="admin") { header('Location:adminpage.php'); } else { header('Location:loginpage.php'); }