Answers for "php http to https"

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
0

make php website https

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
Posted by: Guest on December-11-2020

Browse Popular Code Answers by Language