Answers for "how to force website to use https using 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