ccurtin
9/3/2015 - 5:42 PM

WP - Force HTTPS

WP - Force HTTPS

<?php

/* Forces SSL on */
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
    $_SERVER['HTTPS']='on';

if (stristr($server_name, 'christopherjamescurtin.com'))
    {
        define('FORCE_SSL_ADMIN', true);
        if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
        $_SERVER['HTTPS']='on';
    }