praveen1981
asked on
http to https
Hi
I have deployed MVC application in IIS 7.5 and applied SSL certificate to it, now let's say me site is https://abc.com , which is working fine , but when the user types http://abc.com i want to redirect it to https://abc.com, I used the following url rewrite
<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>
but it is not working, could you please guide me what the mistake i did.
I have deployed MVC application in IIS 7.5 and applied SSL certificate to it, now let's say me site is https://abc.com , which is working fine , but when the user types http://abc.com i want to redirect it to https://abc.com, I used the following url rewrite
<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>
but it is not working, could you please guide me what the mistake i did.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER