Categories
guides

IIS Redirect HTTP to HTTPS Rule

Requirements

Steps

  1. Select desired website in IIS
  2. Open URL Rewrite option from the Features pane
  3. Click Add Rule(s)…
  4. Select the Blank Rule template
  5. Name it something appropriate, such as HTTP to HTTPS
  6. From the Match URL section, set:
    • Set Requested Url to Matches Pattern
    • Set Using to Regular Expressions
    • Set Pattern to (.*)
    • Check Ignore case box
  7. From the Conditions section, click Add
    • Set Condition Input to {HTTPS}
    • Set Check if Input String to Matches the Pattern
    • Set Pattern to ^OFF$
    • Confirm Ignore case is checked
    • Click Ok
  8. From Actions section
    • Set Action Type to Redirect
    • Set Redirect URL to https://{HTTP_HOST}{REQUREST_URI}
    • Confirm Append query string is checked
    • Set Redirect Type to Found (302)
  9. Click Apply

By bo.

I'm @boyEatsSteak in a lot of places. I have been wanting 🍕 for weeks. I like gadgets and technology and keeping notes and tips for my future self since all I can remember is that I forget things.