Reputation: 751
I have SSL site set up on the main site in WordPress multisite. I'm having trouble accessing the subdomain site because it doesn't have SSL (and doesn't need it), but wordpress is redirecting to https://
This is my htaccess code:
# BEGIN rlrssslReallySimpleSSL rsssl_version[2.4.1]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
# END rlrssslReallySimpleSSL`enter code here`
I've tried this article's suggestions but it didn't work for me:
https://really-simple-ssl.com/knowledge-base/preventing-subdomains-add-domains-getting-forced-https/
Thanks!
Upvotes: 0
Views: 323
Reputation: 822
After your line which reads
RewriteCond %{HTTPS} !=on [NC]
You will want to add conditions to limit the domains it is redirecting to https, by adding conditions like
RewriteCond "%{REMOTE_HOST}" "^host1" [OR]
RewriteCond "%{REMOTE_HOST}" "^www.host1" [OR]
RewriteCond "%{REMOTE_HOST}" "^host2"
When adding multiple domains, you'll need to add [OR]
to match the line or the next line rather than attempting to match both of them. There is more information about the configuration of RewriteCond in the Apache HTTP Server documentation
Upvotes: 1