ModRewrite can easily handle stripping the www off the front of my domain.
In .htaccess:
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
But with SSL, the certificate check comes before the .htaccess rewrite, causing certificate error.
I would rather not buy an SSL certificate for the www only to redirect it.
Can you offer me a smarter solution?
(btw EV Certificates are not available as wildcards)