if ($_SERVER['SERVER_PORT'] != 443) { header("Location: https://www.yourforum.com/forum/admincp"); exit; }