Answers for "how to force https on php"

PHP
0

force https with php

if($_SERVER["HTTPS"] != "on")
{
    header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
    exit();
}
Posted by: Guest on December-18-2020

Browse Popular Code Answers by Language