如何在web.confg中将url重定向到localhost上的ssl url

问题描述

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。我该如何解决?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)