Overview
Users may want to redirect users from HTTP to HTTPS through an IIS rewrite rule. This solution was provided when a user was experiencing issues with enabling the IIS rewrite module.
Solution
To accomplish this you must:
- First, make sure that the URL Rewrite module has been installed. You can check if this is installed by opening up IIS and clicking on a website and see if the URL Rewrite button is available.
- Click Blank Rule and Click Ok.
-
Enter any rule name you wish.
In the Match URL section:
- Select Matches the Pattern in the Requested URL drop-down menu
- Select Regular Expressions in the Using drop-down menu
- Enter the following pattern in the Match URL section: (.*)
- Check the Ignore case box -
In the Conditions section, select Match all under the Logical Grouping drop-down menu and press Add.
In the prompted window:- Enter {HTTPS} as a condition input
- Select Matches the Pattern from the drop-down menu
- Enter ^OFF$ as a pattern
- Press OK -
In the Action section, select Redirect as the action type and specify the following for Redirect URL:
https://{HTTP_HOST}{REQUEST_URI}Un-check the Append query string box.
Select the Redirection Type of your choice. The whole Action section should look like this: -
Click on Apply on the right side of the Actions menu.
Comments
0 comments
Please sign in to leave a comment.