Click here to Skip to main content
15,896,544 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Why conversion of https to http not working for IIS 7.5 in web.config?

XML
<rule name="ForceNonHttps" stopProcessing="true">
  <match url="(.*)" ignoreCase="true" negate="true" />
  <conditions>
      <add input="{SERVER_PORT}" pattern="^443$" />
  </conditions>
  <action type="Redirect" redirectType="Found" url="http://{HTTP_HOST}{REQUEST_URI}" />
</rule>


Under HTTP_HOST I gave 192.168.30.1 and for pattern gave port no of the same and REQUEST_URL as R:1.
Posted
Comments
Rahul 105 30-Jan-14 22:46pm    
Ok.Please provide a detailed link to convert http auto redirect to https inorder to cross check with I did.
I followed this:
http://www.jppinto.com/2010/03/automatically-redirect-http-requests-to-https-on-iis7-using-url-rewrite-2-0/
But the issue remains as http is not getting redirected to https and viceversa with SSL enabled.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900