To force HTTPS with a PHP script, just put this snippet near the top:
if ($_SERVER['SERVER_PORT'] != 443) {
header("Location: https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
}
To force HTTPS with a PHP script, just put this snippet near the top:
if ($_SERVER['SERVER_PORT'] != 443) {
header("Location: https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
}
RSS feed for comments on this post
Copyright 2012 Major Hayden / Theme: R755 / This request brought to you by .
It works. Thank you.