Url rewriting web.config重定向规则在IE和FireFox中不起作用

Url rewriting web.config重定向规则在IE和FireFox中不起作用,url-rewriting,web-config,Url Rewriting,Web Config,我有两个域名baddomain.com和gooddomain.com,它们指向同一托管服务。我已经购买了SSl证书,现在我想将坏的证书重定向到安装了SSl的好证书。我写了这些规则,它可以在Chrome上运行,但不能在IE和firefox上运行。坏域重定向到https,而不是重定向到好域。谢谢 <!--Redirect from bad domain to good one--> <rule name="BadtoGood" patternSyntax=&q

我有两个域名baddomain.comgooddomain.com,它们指向同一托管服务。我已经购买了SSl证书,现在我想将坏的证书重定向到安装了SSl的好证书。我写了这些规则,它可以在Chrome上运行,但不能在IE和firefox上运行。坏域重定向到https,而不是重定向到好域。谢谢

 <!--Redirect from bad domain to good one-->
<rule name="BadtoGood" patternSyntax="Wildcard" stopProcessing="true">
    <match url="*" />
    <conditions logicalGrouping="MatchAll">
        <add input="{HTTP_HOST}" pattern="baddomain.com" />
    </conditions>
    <action type="Redirect" url="https://gooddomain.com/{R:0}" redirectType="Permanent" />
</rule>             

<!--Force https on good domain -->
<rule name="forceHTTPS" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
    <match url="*" negate="false" />
    <conditions logicalGrouping="MatchAll">
        <add input="{HTTPS}" pattern="off" />
        <add input="{HTTP_HOST}" pattern="localhost" negate="true" />
    </conditions>
    <action type="Redirect" url="https://gooddomain.com/{R:0}" redirectType="Permanent" />
</rule>

原因是我通过网站控制面板启用了强制https,它覆盖了web.config中的下游设置

就我而言,这就是路径:

适用于windows的Plesk网站和域托管设置