Redirecting CWA 2007 R2 from HTTP to HTTPS in IIS 7

This task has always been more of a pain that it ever should have, regardless of application. After trying a few of the usual hacks like requiring SSL and using a custom error page or an HTTP to HTTPS module I found I still wasn’t having any luck. From what I can tell this is because there actually isn’t any kind of default web page in the CWA virtual directory so when you browse to the HTTP version of the site you actually get a 404 “Page not Found” error before anything else happens.

I ended up keying off that idea and changed the 404 error page to be a redirect to the HTTPS page. I’m still testing this out, but I haven’t run into any issues yet with this approach. To change your site the same way:

  1. Open IIS 7 Manager.
  2. Click on the CWA virtual web site you want to redirect.
  3. Double-click on Error Pages.
  4. Highlight 404 and press Edit in the right pane.
  5. Select the Respond with a 302 redirect, enter https://My-CWA-URL and click OK.
  6. Run a iisreset /noforce for good measure.

I’m curious how this works for everyone and if you see any issues with this method.