我有一个服务器,现在有一个SSL,我们希望对域的所有请求都转到https并拥有www。如果未首先输入则输入。
我使用了IIS 8的ISAPI构建器和手动XML代码,并且在转到该URL https://strictly-software.com/时都返回错误,因为它不会将www.inURL放入
我要执行的只是添加www。进入URL,因为无需添加https。
IIS 8 Builder版本
<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>
我的版本
<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
</rule>
并且两者都返回https://strictly-software.com和http://strictly-software.com上的错误,它们使用url strict-software.com重定向到错误,但是刷新页面可以解决该问题。
所以我要问是否有人知道如何整理这个新的XML ISAPI,以便
如果未添加https,则将其添加以保护网站 如果没有www。放置在域中,然后将其添加到站点中,以便URL始终为https://www.strictly-software.com
感谢您的帮助。