0

I have created a WordPress multisite on the primary domain alaksns.com which is secure with ssl certificate. Then I added a new site as blog.alaksns.com which only works when accessed with http whenver I try to access it with https it gives a blankpage. I also tried by changing the url of the site from the network settings by adding https but it gives 404 error

0

I like a simple, all-purpose htaccess to enable https on all site requests:

RewriteEngine On

RewriteCond %{HTTPS} !=on

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 

In addition, go into Network Admin, Sites, then Edit each site, then the Settings tab for each site. Change all occurences of http to https for your site. (Some plugins may have the http, so changing them will get rid of the 'mixed' warning in browsers.)

Plus, you will need to change all media URLs on all sites. That's easiest with a search/replace plugin (I like "Better Search and Replace", but check the plugin you choose that it supports multisite) to change http://www.example.com to https://www.example.com (using your domain name).

Although the above htaccess might take care of http in plugins/themes/media/etc, I like a more complete process, so I change everything as needed. Backup your database first, of course.

0

I understand you would like to keep one site-ssl and the other one-non-ssl. Alotough I would recommend using ssl on both, try this:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^blog\.alaksns\.com$ [NC]
RewriteCond %{HTTP_HOST} ^alaksns\.com [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.