Security 添加SSL证书后需要键入https://awlays
我从某家公司购买了SSL证书,并将其安装在我的Windows 2016服务器IIS 10上。其绑定如下图所示 当我打字时,它工作得很好。。。但当我只键入example.com时,它就会转到IIS默认站点。以及当我键入时,它工作正常,但当我只键入www.example.com时,它将转到默认的IIS站点。Security 添加SSL证书后需要键入https://awlays,security,ssl,iis,windows-server-2016,iis-10,Security,Ssl,Iis,Windows Server 2016,Iis 10,我从某家公司购买了SSL证书,并将其安装在我的Windows 2016服务器IIS 10上。其绑定如下图所示 当我打字时,它工作得很好。。。但当我只键入example.com时,它就会转到IIS默认站点。以及当我键入时,它工作正常,但当我只键入www.example.com时,它将转到默认的IIS站点。 这意味着当我键入https://时,它可以正常工作。。。但通常用户键入example.com或www.example.com。。 那么,我如何配置这一个来满足上述要求呢?这正是当前站点绑定的结
这意味着当我键入https://时,它可以正常工作。。。但通常用户键入example.com或www.example.com。。
那么,我如何配置这一个来满足上述要求呢?这正是当前站点绑定的结果 所以我的建议是,
这正是当前站点绑定的结果 所以我的建议是,
当您在web浏览器中键入example.com或www.example.com时,客户端将只通过http而不是类似https的方式发送请求 由于您的网站需要https,因此将检查是否需要SSL。不能在同一站点下同时承载http和https绑定。否则,要求SSL握手将损坏URL重定向规则 请安装URL重写模块并将此规则置于默认网站下
<rule name="HTTPS force" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
</rule>
当您在web浏览器中键入example.com或www.example.com时,客户端将通过http而不是类似https的方式发送请求 由于您的网站需要https,因此将检查是否需要SSL。不能在同一站点下同时承载http和https绑定。否则,要求SSL握手将损坏URL重定向规则 请安装URL重写模块并将此规则置于默认网站下
<rule name="HTTPS force" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
</rule>