Asp.net IIS Url重写不适用于Firefox和Chrome
我的web.config中有下面的重写块Asp.net IIS Url重写不适用于Firefox和Chrome,asp.net,asp.net-mvc,iis,url-rewriting,url-redirection,Asp.net,Asp.net Mvc,Iis,Url Rewriting,Url Redirection,我的web.config中有下面的重写块 <rewrite> <rules> <rule name="Redirect HTTP to HTTPS" stopProcessing="true"> <match url="(.*)"/> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true"/>
<rewrite>
<rules>
<rule name="Redirect HTTP to HTTPS" stopProcessing="true">
<match url="(.*)"/>
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true"/>
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found"/>
</rule>
</rules>
</rewrite>
当我通过IE浏览页面时,它会将所有请求重定向到https。当我在Chrome或Firefox中访问页面时,它们似乎不会重定向,而只停留在http上。除了IE,我在地址栏中看不到https。任何想法都会有帮助。谢谢这不是ASP.NET重定向,而是IIS Url重写。我建议您首先在IE F12和Chrome Ctrl-Shift-I中打开开发工具,比较响应头。我建议使用Fiddler查看请求/响应的确切内容。