how to force SSL on the main site of our network

I've been desperately researching how to force SSL on the main site of our network, and I'm almost there with your .htaccess edit. Almost…

The problem is, while this appears to work for visitors to the site, any logged in users are redirected to the https version of their site from links in the Admin bar.

If the user manually types in they can view the site. If, however, the use the Admin Bar -> My Sites menu item, they are directed to

Any feedback is appreciated for seamlessly integrating SSL but forcing HTTPS only on the main site for all visitors and logged in users.

Still trying to nail this on our dev install, so here is what I currently have…

.htacces edit:

# force https per site(s)

RewriteCond %{HTTPS} off

RewriteCond %{HTTP_HOST} ^$ [NC]

RewriteCond %{HTTP_HOST} !^$

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

wp-config edit:


if ( $_SERVER["HTTP_HOST"] == "" ) {

define('FORCE_SSL_ADMIN', true);

define('FORCE_SSL_LOGIN', true);


I'm guessing we need to implement some sort of similar variable(s) in the wp-config hack, but we have 1,100+ sites on the network, and I only need to force SSL/HTTPS on the main site for now. (Eventually on 5 sites, max.) AND: I need to make sure logged in users can still easily navigate to their own sites and dashboards via https. AND: I'd rather not use a plugin to do this.

Thanks in advance for any help!