Requirements
- URL Rewrite rule installed in IIS
Steps
- Select desired website in IIS
- Open URL Rewrite option from the Features pane
- Click Add Rule(s)…
- Select the Blank Rule template
- Name it something appropriate, such as HTTP to HTTPS
- From the Match URL section, set:
- Set Requested Url to Matches Pattern
- Set Using to Regular Expressions
- Set Pattern to
(.*)
- Check Ignore case box
- 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
- Set Condition Input to
- 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)
- Click Apply