Php protocol HTTPS page does not redirect

Asked

Viewed 18 times

0

Good afternoon! I have a problem, when the login expires the page is empty and the command

header("location: login.html"); 
exit(); 

does not work. This only happens on the site with HTTPS. Someone can give a light?

$valor = isset($_SESSION['MM_Admin']) ? 'S' : 'N'; 
if($valor == 'N') {
  header("location: login.html"); exit();
}
  • Friend tries to put all the way in, like: https://www.seusystem/login

  • Press F12, go to Security and see which error gives and ask the question.

  • I already put the complete path and nothing. In Security Overview does not present any error.

  • Have you tried giving an ini_set('display_errors', true); ? If a document is changing the header before that code, that code does not work. The header can only be changed once and this generates a php error that ini_set will show.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.