I'm trying to redirect all wildcard sub-domains to example.com via ISAPI Rewrite 2.
e.g. qqqq.example.com 301 redirects to example.com
Using other info here on Stack I've got the following to redirect www to non-www:
RewriteEngine on
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP:Host} ^(?!www\.)(.+)$ [NC]
RewriteCond %{REQUEST_URI} (.+)
RewriteRule .? http(?%1s)://www.%2%3 [R=301,L]
Any help would be greatly appreciated as to what other Cond/Rules are needed.
Cheers