So I've been trying to find a configuration that redirects HTTPS://XXX.COM to HTTPS://WWW.XXX.COM. Unfortunately, every configuration that I've tried, doesn't work. All of the rewrite and redirect rules, are applied after the browser checks the certificate against the URL. Thus, the warning web page always appears.