I have multiple sites on windows server using only one ip address
I want to redirect, www & http traffic to https
I have asp.net MVC Application which is hosted on IIS I have done the https forwarding but when I add in site binding host name as www then it works as [login to view URL] but http://mydmains stops working or vice verse I want all the traffic to use ssl automatically it should redirect
This is what i'm using to redirect which is only working either for http or www not for both
<rewrite>
<rules>
<rule name="http to https" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="SeeOther" />
</rule>
</rules>
</rewrite>