SSL on sites-specific WordPress multisite

By default, to use security certificates in WordPress multisite is required a Wilcard SSL if you want to display the green Cadeadinho in the browser address bar on all sites with subdomains on the network, or then an extended SSL certificate if you have sites with domains Own in your multisite installation, if you set up a security certificate for only one domain on the main network site, all the URLs of the other sites will also be displayed with HTTPS, which will make the browser display that horrible message "this site is not safe" Which is not true.

If you intend to have a security certificate on network-specific sites without interfering with the URLs of sites that do not have SSL, the plugin below may be the solution to your problems.

Replace the site IDs according to your needs, if there are more sites with SSL on your network, simply duplicate the commented snippet, adding this rule to each site with a security certificate:
ElseIf ($blog _ id = = 16) {//ID of another sub site that also has SSL//ID for sub site with also have SSL
return Preg_replace ('/^ http://', ' https://', $url);

Leave a Comment

You must be logged in to post a comment.