Solution:1
to EXCLUDE (sub)domains in your “.htaccess” – file, you would use something like:
RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
RewriteCond %{HTTP_HOST} !^webmail\.example\.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
Solution:1
to EXCLUDE (sub)domains in your “.htaccess” – file, you would use something like:
RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
RewriteCond %{HTTP_HOST} !^webmail\.example\.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
Solution:2
Open up your .htaccess file. Since you already have a Multisite installation, the .htaccess should be in your main site folder, because WordPress Multisite requires it. If you open it, you can add a custom rewrite rule.
RewriteEngine on
RewriteCond %{HTTP_HOST} subdomain.ralphjsmit.com
RewriteCond %{REQUEST_URI} !subdomain/
RewriteRule ^(.*)$ subdomain/$1 [L]
All you need to do is adding a simple snippet of code, before the other WordPress RewriteRules apply. Here’s an example of excluding two (fictional) sites subdomain.ralphjsmit.com and subdomain2.ralphjsmit.com from WordPress Multisite. Make sure to place it before the WordPress part.
RewriteEngine on
RewriteCond %{HTTP_HOST} subdomain.ralphjsmit.com
RewriteCond %{REQUEST_URI} !subdomain/
RewriteRule ^(.*)$ subdomain/$1 [L]
RewriteCond %{HTTP_HOST} subdomain2.ralphjsmit.com
RewriteCond %{REQUEST_URI} !subdomain2/
RewriteRule ^(.*)$ subdomain2/$1 [L]
Excluding a subdomain is really as simple as this! Remember to update the reference in all three lines per subdomain