Force HTTPS
function to_https() { if($_SERVER['HTTPS'] != 'on') { $url = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; header('Location:'.$url); exit(); } }
Call the function at the point you want to force https or on top of your global include file so to redirect on any page.
Comments
Add your comment