Created
September 17, 2016 12:03
-
-
Save kevindaus/1d82bcfb76f185fc22f07a7b238f103b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/*HTTPS for prod*/ | |
if (!defined('YII_DEBUG')) { | |
if(!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == ""){ | |
$redirect = "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; | |
header("HTTP/1.1 301 Moved Permanently"); | |
header("Location: $redirect"); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment