【发布时间】:2020-12-11 01:20:04
【问题描述】:
localhost:5011 是 url,localhost:44330 是 SSL url。我想在我的 web.config 中将 http://localhost:5011 重定向到 https://localhost:44330。我找到了这个规则,但它没有按我的意愿工作:
<rule name="Redirect local requests to https" stopProcessing="true">
<match url="(localhost:5011*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://localhost:44330/" redirectType="Permanent" appendQueryString="true" />
</rule>
这将重定向到 https://localhost:5011。我该如何解决这个问题?
【问题讨论】:
-
blog.lextudio.com/… 中的错误 1
标签: asp.net xml iis https web-config