PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Force Redirect To Secure Web Using PHP

Go down

Force Redirect To Secure Web Using PHP Empty Force Redirect To Secure Web Using PHP

Post by jamied_uk 1st January 2020, 14:20

Vid


Code:


Code:
<?php
// (c) J~Net 2020
// jnet.sytes.net
// jnet.forumotion.com
//
$self=(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "https") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
   // exit();
// Checking https
if($_SERVER["HTTPS"] != "on"){
    header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
    exit();
}
?>
jamied_uk
jamied_uk
Admin

Posts : 2950
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum