Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Address Neutrality Tweak
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
$_SERVER['HTTPS'] = 'on';
function isSecure() {
return(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443;
}
$web_site = $_SERVER['HTTP_HOST'];
$schema = isSecure() ? 'https://' : 'http://';
$web_site_url = $schema . $web_site;
define('WP_HOME', $web_site_url);
define('WP_SITEURL', $web_site_url);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment