Link to home
Start Free TrialLog in
Avatar of praveen1981
praveen1981Flag for India

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.
ASKER CERTIFIED SOLUTION
Avatar of it_saige
it_saige
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of praveen1981

ASKER

Thanks.