簡體   English   中英

使用Webconfig文件中的重寫規則將https重定向到http

[英]Redirect https to http using rewrite rule in webconfig file

到目前為止,這是我嘗試過的。

 <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>

如何將https://www.mysite.com重定向到http://www.mysite.com

這是很久以前問過的,但似乎已經在這里得到了回答: 如何使用web.config文件強制HTTPS 如果您使用完整答案,請密切注意其中提到將查詢字符串附加兩次的注釋之一。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM