Created
July 12, 2014 04:36
-
-
Save 5iDS/e4997f7ed8b31c27f8da to your computer and use it in GitHub Desktop.
redirect to SSL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function redirectTohttps() { | |
if($_SERVER['HTTPS']!=”on”) { | |
$redirect= “https://”.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; | |
header(“Location:$redirect”); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment