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é
PHP Warning: include_once(plugins/simplepie/simplepie.inc): failed to open stream: No such file or directory in C:\Inetpub\vhosts\sozezzo.com\httpsdocs\blog\plugins\simplepie\plx.simplepie.php on line 2 PHP Warning: include_once(): Failed opening 'plugins/simplepie/simplepie.inc' for inclusion (include_path='.;.\includes;.\pear') in C:\Inetpub\vhosts\sozezzo.com\httpsdocs\blog\plugins\simplepie\plx.simplepie.php on line 2