Last active
August 7, 2017 06:42
-
-
Save sebastian-hsu/d0fdc7f4f1b88df0b7dcd76c2f9ead0c to your computer and use it in GitHub Desktop.
wp-config.php HTTPS headers
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
if (($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] == 'https') || ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) { | |
$_SERVER['HTTPS'] = 'on'; | |
} | |
#If you have blow definition, please change from http to https | |
define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/'); | |
define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment