We are having an issue implementing a rewrite rule that properly direct all users to a secure connection (ie. HTTPS) for any of our Virtual Hosts.

We have put in place the appropriate rewrite rules into our web.config file in IIS and have tested them with the main domain and it works just fine, but the rewrite fails for any Virtual Hosts that we have setup.

Right now, when a user accesses http://ourdomain.com they see a 404 error. If they access it via https://ourdomain.com they see the site just fine. Any help or insight would be appreciated.