Friday, February 06, 2009

Redirect to HTTPS from HTTP in IIS

This is a common problem, I've seen many solutions but I like this one the best.
http://kojiroh.wordpress.com/2006/09/06/hello-world/

The basic gist is to create a simple asp page whose sole role is redirecting to asp. Then the trick is to use IIS custom errors and assign 403;4 SSL Required to this page. Make the rest of your site except this page/file SSL required. So whenever someone hits your website without ssl, custom error routes them to that asp, which then redirects them to https.

No comments: