So my SSL certificate only applies to https://example.com - not https://www.example.com (can\'t complain, it was free).
After venturing into mod_re
Is there a way to prevent traffic to hit your server the improper way (https:// www) before the browser gives out a certificate error?
No, there's nothing you can do, your assessment is correct that the browser looks at the server certificate and sees that the host doesn't match and displays the error. The error isn't generated by the server, and this happens before a request is even sent to the server. This happens during the SSL handshake. The only things you can do are prevent any http://www
links from existing, or buy a new certificate that includes "www".
As for your rules, there's really no way to simplify it since you have multiple conditions for each rule.