how to redirect page to https in php?
Rédigé par Sozezzo - - Aucun commentaireSite d'origine : http://stackoverflow.com/questions/9135290/how-to-redirect-page-to-https-in-php
Ajouter aux fichier : index.php
# Add to redirect to HTTPS
if(!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "" || $_SERVER['HTTPS'] == "off"){
$redirect = "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
header("Location: $redirect");
exit;
}