...
- Open web.config
- Find <services>
- For each endpoint within each <service> do one of:
- For HTTPS access only: Edit “Http” in binding value to “Https”.
Ex: “basicHttpBinding” ➔ “basicHttpsBinding”; “mexHttpBinding” ➔ “mexHttpsBinding” - For both HTTP and HTTPS access: Add a copy all endpoints with “Http” in binding value and edit value to have Https.
Ex: Copy endpoint line and edit “basicHttpBinding” ➔ “basicHttpsBinding” – Use this if both HTTP and HTTPS will be used.
...
- Install the URL Rewrite Module for IIS: http://www.iis.net/downloads/microsoft/url-rewrite
- Require SSL should not be checked for either Default Web Site or for the 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 each web application (i.e. Adams Web, Adams Admin, Adams Bridge)
- In IIS Manager, select the application (ex: AdamsWeb, AdamsAdmin, AdamsBridge) under Default Web Site
- In the application’s IIS section, open the URL Rewrite module
NOTE: If the URL Rewrite module does not appear as an option after installing it, try closing and reopening IIS Manager. - 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
- Click Add…
- Condition input : - {PATH_INFO}
- Check if input string : - Matches the Pattern
- Pattern : - <APPNAME>.*
Replace <APPNAME> in this pattern with the web applications name. Ex:
AdamsWeb.*
AdamsBridge.*
AdamsAdmin.* - Ignore case: checked
- Click OK
- Action
- Action type: Redirect
- Redirect URL: https://{HTTP_HOST}/<APPNAME>/
Replace <APPNAME> with the web application name. Ex:
https://{HTTP_HOST}/AdamsWeb/
https://{HTTP_HOST}/AdamsBridge/
https://{HTTP_HOST}/AdamsAdmin/ - Append query string: checked
- Redirect type: Permanent (301)
- Click Apply (in the upper hand corner)
- Click Back to Rules
- Restart the web application pool
...