Filter out www out of subdomain
Hello,
I have a website called example.com it's a WordPress multi site where a SSL certificate is installed.
But I also have server subdomain on that domain (the other sites in the multi site) but without SSL certificate.
Right now it is configured that when you go to example.com that you will be forced to use the SSL connection.
The subdomain doesn't have that requirement. But when a visitors goes to https:// subdomain. example.com it will get a SSL waring (as you can expect).
Also when you would go www.subdomain.example.com you will get redirected to wp-signup .php
Is there anyway to we can all prevent this?
So if I go I will go to http:// subdomain. example.com
But since it is a multi site it must be something general, because if we create a new site (= a new subdomain) also that site needs to that.
Here is my current htaccess file
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress-
Hello, One approach is to ensure a SSL certificate is installed for each subdomain. The following thread includes a workaround you may find helpful: SOLVED - AutoSSL and WordPress Multisite Thank you. 0
Please sign in to leave a comment.
Comments
1 comment