Redirect https to http using rewrite rule in webconfig file

拥有回忆 提交于 2019-12-25 01:45:16

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!