force ssl admin area to one site in multi site network with multiple networks wordpress

real new to php…

I have a multi site worpress install running two networks..

Read More

The first network has a ssl cert but the second one does not.

I an currently using the define(‘FORCE_SSL_ADMIN’, true); in the wp config file to force the login and admin area to be secure.

Problem is the second network does not have the ssl so getting browser warnings when trying to access the login screen of the second netowrk.

My first site with the ssl is fanpage4me.com and the second one withouth the ssl but using the same wp config file because of the multi site is scottheliker.com

Would anybody be kind enough to paste the exact code here I would need to put in my wp config file to only force the define(‘FORCE_SSL_ADMIN’, true); to the first domain which is fanpage4me.com

Thanks Scott…

I also need to force ssl to all the sub sites of the first network when they get created automatically if that is possible.. right now the home and site url get prefixed with http instead of https so have to manually go in and changed evertime someone creates a blog..

Related posts

Leave a Reply

1 comment

  1. In your wp-config.php file just wrap your define in an if statement.

    if ( $_SERVER["HTTP_HOST"] == "fanpage4me.com" ) {
      define('FORCE_SSL_ADMIN', true);
    }
    

    I’ve used this technique for several options and multi-domain wordpress sites.

    Tony