Multisite with Domain Mapping and SSL
-
I have seen some posts about using SSL with multisites where the site has a wildcard SSL cert and also posts about using SSL only with the login page and not the rest of the site. But my problem is a little different.
We have an SSL cert only for our main domain (handbellmusicians.org). But it does not cover any of our subdomains. We are running multisites and have sites for area1.handbellmusicians.org, area2.handbellmusicians.org, etc.
My htaccess file has the required lines for the WordPress multisite installation (which uses domain mapping, by the way). But when I add the code to rewrite the call to our main site from http to https, it causes all of my area sites to quit working. What seems particularly odd is that I don’t get any sort of error or security warning when going to them. They just all end up redirecting the user to the main handbellmusicians.org front page, rather than the subdomain site.
We operate on a tight budget and cannot afford separate SSL certs for each subdomain or even a wildcard cert. And it is not really necessary to have the subdomains secure. The main site needs to be secure as it has member logins on the top of the pages. And we need this to be secure to pass a compliance scan.
Following is the contents of my htaccess file as it stands right now. Then I will post the lines I’m trying to add for the rewrite to https.
Is there anyway to get only calls to the main site to use https, yet still get the subdomain sites to show up.
EXISTING HTACCESS:
AddHandler php5-script .php RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L] #Add type for jplayer AddType video/x-m4v .m4v
———
And here is the code I’m trying to add to rewrite http to https for the main site.
RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.handbellmusicians.org/$1 [R,L]
- The topic ‘Multisite with Domain Mapping and SSL’ is closed to new replies.