SSW Foursquare

Do you use URL Rewrite to redirect HTTP to HTTPS?

Last updated by Tiago Araújo [SSW] 12 months ago.See history

Using IIS URL Rewrite Module, Web administrators can easily set up rules to define URL rewriting behavior based on HTTP headers, HTTP response or request headers, IIS server variables, and programmatic rules. HTTP to HTTPS redirect helps boost your Google site ranking as well as adding enforcing SSL security.

First you must download the IIS URL Rewrite module from Web Platform Component Installer. Ensure that a valid SSL Certificate is installed in IIS Server.

  1. Open URL Rewrite and begin with Add Rule(s) | Blank rule (Inbound rules)
  2. Name the rule "HTTP to HTTPS redirect"
  3. Add Pattern (.\*)
  4. Add Conditions
  5. Condition input: {HTTPS}
  6. Pattern: off
  7. Add Action
  8. Action type: Redirect
  9. Action Properties: https://{HTTP\_HOST}/{R:1}
  10. Redirect type: Found (302)
  11. Apply | Back to Rules

IISURLRewrite
Figure: HTTP to HTTPS redirect using IIS URL Rewrite module

We open source. Powered by GitHub