ISAPI rewrite - "Redirecting non-www version to www" rule with SSL
I'm using a tool called : ISAPI Rewrite 3 Lite from Helicon Tech (an "apache .htaccess mod_rewrite compatible module for IIS"). 

I've applied the "Redirecting non-www version to www" rule (from : http://www.helicontech.com/isapi_rewrite/doc/examples.htm#hotlinking ). i.e. :  

    RewriteEngine on
    
    RewriteCond %{HTTPS} (on)?
    RewriteCond %{HTTP:Host} ^(?!www\.)(.+)$ [NC]
    RewriteCond %{REQUEST_URI} (.+)
    RewriteRule .? http(?%1s)://www.%2%3 [R=301,L]


This works ok, but I have a slight problem with browser warnings when used with SSL. 
Say I want a url request like :  https://MyDomain.com/abc/login.aspx  to be re-directed to : https://www.MyDomain.com/abc/login.aspx 
The browser will show a warning like : "The security certificate presented by this website was issued for a different website's address." This makes sense because our SSL certificate only works for "www.MyDomain.com" (and not "MyDomain.com"). If you click "Continue to this website ?" it redirects fine to the required url, and all is well.

My question : is there something that can be done to make the browser SSL certificate warning NOT come up ? (Preferably without having to change the SSL certificate). 

Thanks.
 

   



ISAPI rewrite - "Redirecting non-www version to www" rule with SSL
===

I'm using a tool called : ISAPI Rewrite 3 Lite from Helicon Tech (an "apache .htaccess mod_rewrite compatible module for IIS"). 

I've applied the "Redirecting non-www version to www" rule (from : http://www.helicontech.com/isapi_rewrite/doc/examples.htm#hotlinking ). i.e. :  

    RewriteEngine on
    
    RewriteCond %{HTTPS} (on)?
    RewriteCond %{HTTP:Host} ^(?!www\.)(.+)$ [NC]
    RewriteCond %{REQUEST_URI} (.+)
    RewriteRule .? http(?%1s)://www.%2%3 [R=301,L]


This works ok, but I have a slight problem with browser warnings when used with SSL. 
Say I want a url request like :  https://MyDomain.com/abc/login.aspx  to be re-directed to : https://www.MyDomain.com/abc/login.aspx 
The browser will show a warning like : "The security certificate presented by this website was issued for a different website's address." This makes sense because our SSL certificate only works for "www.MyDomain.com" (and not "MyDomain.com"). If you click "Continue to this website ?" it redirects fine to the required url, and all is well.

My question : is there something that can be done to make the browser SSL certificate warning NOT come up ? (Preferably without having to change the SSL certificate). 

Thanks.
 

   


