Redirect URL重写无效证书

Redirect URL重写无效证书,redirect,url-rewriting,iis-10,Redirect,Url Rewriting,Iis 10,因此,我们在IIS 10.0上运行,并且在ISP上注册了多个域,这些域都指向Web服务器的公共IP。Web服务器只有一个证书分配给通配符子域。所以#.rootdomain.nl 我已经设置了一个URL重写,将所有不同的域重写到我们的根域:但是我遇到的问题是,第一个重定向正常,但是第二个没有重定向,而浏览器说这个域没有有效的证书 URL配置: <rule name="Redirects to www.domain.com" enabled="true"

因此,我们在IIS 10.0上运行,并且在ISP上注册了多个域,这些域都指向Web服务器的公共IP。Web服务器只有一个证书分配给通配符子域。所以#.rootdomain.nl

我已经设置了一个URL重写,将所有不同的域重写到我们的根域:但是我遇到的问题是,第一个重定向正常,但是第二个没有重定向,而浏览器说这个域没有有效的证书

URL配置:

<rule name="Redirects to www.domain.com" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
    <match url=".*" />
    <conditions logicalGrouping="MatchAny">
        <add input="{HTTP_HOST}" pattern="^(www.)?rootdomain.(com|be|de)$" />
    </conditions>
    <action type="Redirect" url="https://www.rootdomain.nl/{R:0}" redirectType="Permanent" />
</rule>

-->>重定向-->>
rootdomain.com-->>重定向-->>

.de to.nl www.rootdomain.de-->>重定向-->> rootdomain.de-->>重定向-->>

.be to.nl www.rootdomain.be-->>重定向-->> rootdomain.be-->>重定向-->>

当然,所有http流量必须重定向到HTTPS,这是第二条规则:

<rule name="Redirect to HTTPS" enabled="false" patternSyntax="Wildcard" stopProcessing="true">
    <match url="*" />
    <conditions logicalGrouping="MatchAny" trackAllCaptures="false">
        <add input="{HTTPS}" pattern="OFF" />
    </conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" />

-->>无效的证书(仍单击“继续”->>重定向-->>

rootdomain.com-->>无效的证书(无论如何单击go)-->>重定向-->>

我们必须确保HTTPS站点绑定配置了有效的证书。服务器拥有的每个域名都对应于证书的主题,否则,当我们访问浏览器时,浏览器将提示与无效证书相关的错误。
为了将多个证书绑定到每个域名的同一端口,我们需要勾选以下选项。

结果。

最后,我们可以根据自己的喜好应用URL规则

<system.webServer>
       <rewrite>
        <rules>
          <rule name="MyRule" enabled="true" stopProcessing="true">
            <match url="(.*)" ignoreCase="false" />
            <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                <add input="{http_host}" pattern="www.bing2.com" />
            </conditions>
            <action type="Redirect" url="https://www.bing.com" redirectType="Permanent" />
          </rule>
        </rules>
      </rewrite>
</system.webServer>


如果有什么我可以帮忙的,请随时告诉我。

您的服务器必须在重写之前和之后拥有所有域的证书。所以现在它错过了.com和其他域的证书。