问题
This is what I have tried so far.
<rule name="https main site to http" stopProcessing="true">
<match url="^(.*)$" ignoreCase="true" />
<conditions>
<add input="{HTTPS}" pattern="Off" />
</conditions>
<action type="Redirect" url="http://{HTTP_HOST}/{REQUEST_URI}" />
</rule>
How can I redirect https://www.mysite.com to http://www.mysite.com
回答1:
This was asked a long time ago, but it looks like this has already been answered here: How to force HTTPS using a web.config file. Pay close attention to one of the comments that mentions that the query string is appended twice if you use the full answer.
来源:https://stackoverflow.com/questions/18109047/redirect-https-to-http-using-rewrite-rule-in-webconfig-file