I have an IIS7/WinServer2008 configuration with a wildcard SSL certificate installed (*.mydomain.com). The web server holds several websites each configured to route via a host header off the same IP (call it IP1). Some of the sites are configured to use SSL and some are not.
So I have...
a.mydomain.com -> SSL b.mydomain.com -> non-SSL c.mydomain.com -> SSL d.mydomain.com -> non-SSL e.mydomain.com -> non-SSL
For the example sites A and C above (the SSL sites) I wanted standard HTTP URL's to redirect to HTTPS. So at the root of IIS (red arrow) I have configured the Error Pages settings by adding a custom Status Code of 403.4 (see below for the settings).
The contents of the redirectHttpToHttps.htm file are...
Then for both the A and C sites I replaced the old bindings with an SSL binding (routed specifically to IP1) and set the SSL settings to "Require SSL".
Now I have a non-wildcard SSL cert to introduce into the mix. This is for the site bound to aaa.customerdomain.com. So I added the cert to my IIS server, and changed the binding of the aaa.customerdomain.com site to use an SSL binding with the new cert and against a new IP2.
Can someone help me with the proper way to configure IIS so I can make all this work?