Created
September 24, 2009 07:49
-
-
Save stylephreak/192599 to your computer and use it in GitHub Desktop.
CMSMS tag - Forces a CMS Made Simple page to use https
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
// CMSMS tag - Forces a CMS Made Simple page to use https | |
if(emptyempty($_SERVER['HTTPS'])) | |
{ | |
// If not, redirect | |
$newurl = 'https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; | |
header("location: $newurl"); | |
exit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment