If you're OK with a client-side solution, [this one][1] is pretty simple and has worked for me in the past. Some browser configurations may spawn a warning but I believe those are generally very old browsers. [1]: https://stackoverflow.com/questions/4723213/detect-http-or-https-then-force-https-in-javascript