Codice PHP:
if ($variabile != 'xxx') {
  
header("location: login.php"); // L'url dovrebbe essere assoluto.
  
exit();