Friday, 26 December 2014

How to Enforce HTTPS on your Azure website

URL Rewrite rules are defined in a web.config file stored in the root of your application. The following example contains a basic URL Rewrite rule that forces all incoming traffic to use HTTPS.
URL Rewrite Example Web.Config











This rule works by returning an HTTP status code of 301 (permanent redirect) when the user requests a page using HTTP. The 301 redirects the request to the same URL as the visitor requested, but replaces the HTTP portion of the request with HTTPS. For example, http://testwebsite.com would be redirected to https://testwebsite.com.

0 comments:

Post a Comment