how to redirect page to https in php?

Rédigé par M Sozezzo - - Aucun commentaire

Site 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;
}

Lire la suite de how to redirect page to https in php?

My blog, why not?

Rédigé par M Sozezzo - - 1 commentaire
Portugueis, English, or français.... Mes annotations. My stuffs....

I will try to abandon shaarli because inMyPluxml is parfait.

My old blogs stay privately, but I will transfer it to here!

Fil RSS des articles de ce mot clé