When user enters domain.com it should redirect to my application which is https://www.domain.com. Currently it is not happening and it is showing a page "This Connection is Untrusted."
I have following rewrite tag added in my web.config:
<rewrite>
<rules>
<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
</rule>
</rules>
</rewrite>
Currently in my IIS 7.5 i have added Inbound Rule which i have settings as follows:
In Match URL
Requested URL: Matches the Pattern
Using: Reqular Expression
Pattern: (.*)
Ignore Case: Checked
Conditions
Logical Grouping: Match All
Input: {HTTPS}
Type: Matches the Pattern
Pattern: ^OFF$
Track group across condition: unchecked
Action
Action Type: Redirect
Redirect URL: https://{HTTP_HOST}/{R:1}
Append Query string: checked
Redirect Type: See Other (303)
Please let me know if any changes can be made to existing settings.
Thanks in advance.