I have a server with a main domain, and several subdomains. There is independent wordpress sites/installs on each of the subdomains, and also one on the main domain. (I know about multisite, but they're all independent clients so I didn't want mixed databases).
All I want is for all of them to use HTTPS in the easiest way possible (I continue creating subsites for new clients). Usually I use the plugin "Really Simple SSL", and it works, but it doesn't seem to support subdomains in this way.
Right now I have my main domain with the plugin installed, with HTTPS fully working all good. It has this htaccess:
# BEGIN rlrssslReallySimpleSSL rsssl_version[3.2.6]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
# END rlrssslReallySimpleSSL
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
If I install the plugin and try to use it in the subsite it tried adding this code (but it automatically fails and it doesn't insert it):
# BEGIN rlrssslReallySimpleSSL rsssl_version[3.2.9]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
# END rlrssslReallySimpleSSL
To my little htaccess understanding, it fails because that is made for a main domain. My subdomain right now is being detected as non-secure.
I would like to know what should I modify to make subdomains work. It would be ideal if I could do the mod on the main htaccess, so the change works for any subdomain created and future ones by default. If not, I will need to do it on each htaccess of each subfolder (if that's the case, it's good too).
I don't want www redirections of any kind. None.
.htaccess
files are located. Thanks.