...
- Install the URL Rewrite Module for IIS: http://www.iis.net/downloads/microsoft/url-rewrite
- Require SSL must not be checked for either Default Web Site or for any application (ex: AdamsAdmin, AdamsWeb, AdamsBridge, etc) under that. You can check the SSL Settings for each to see that it isn’t.
- Create the URL rewrite rules for the Default Web Site
- In IIS Manager select the Default Web Site In the IIS section, open the URL Rewrite module
- Click Add Rule(s)…
- Select Inbound rules > Blank rule
- Select OK Fill in the following information
- Name - HTTP to HTTPS Redirect
- Match URL
- Requested URL - Matches the Pattern
- Using - Regular Expressions
- Pattern - (.*)
- Ignore case - checked
- Conditions
- Logical grouping: Match All
- Click Add…
- Condition input - {HTTPS}
- Check if input string - Matches the Pattern
- Pattern - ^OFF$
- Ignore case - checked
- Click OK
Action - Action type: Redirect Redirect URL:
- IIS Manager must be closed
Add a web.config file to the web site's root directory (ex: wwwroot) with the below content or the configuration section only if the web.config already exists.
Code Block language xml title web.config <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Redirect to HTTPS" enabled="true" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="^OFF$" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}
{REQUEST_URI}- Append query string: un-checked
- Redirect type: Permanent (301)
- Click Apply (in the upper hand corner)
- Click Back to Rules Restart the web application pool
/{R:1}" redirectType="SeeOther" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
- Open IIS Manager
- Open Default Web Site → URL Rewite
- Select the "Redirect to HTTPS" rule and click Enable Rule
NOTE: If the URL Rewrite module does not appear as an option after installing it, try closing and reopening IIS Manager.
Require SSL/TLS
Require SSL/TLS/HTTPS for all apps.
...