1) Download and install the URL Rewrite 2.0 module to your
IIS8 server:
Download from here: http://www.iis.net/downloads/microsoft/url-rewrite
2) Once installed, open IIS Manager, expand the Sites
container and select the website you wish to configure the http redirection.
3) Once highlighted, double click the URL Rewrite option in
the right hand pane. Select Add Rule and configure the following:
NAME
Select: Blank Rule
Name: http to https
Match URL – Requested URL: Matches the Pattern
Match URL – Using: Regular Expression
Pattern: (.*)
CONDITIONS
Conditions: Add
Condition Input: {HTTPS}
Check if input string: Matches the Pattern
Pattern: ^OFF$
Click OK
ACTION
Action type: Redirect
Redirect URL: https://{HTTP_HOST}/{R:1}
Redirect type: See Other (303)
Click Apply
Requests to your site via HTTP should now be redirecting to
HTTPS
No comments:
Post a Comment