0
我在domain.com上擁有一個站點。我最近安裝了SSL證書,因此我可以使用HTTPS。在www中導致404的URL的URL
在IIS中,我爲http和https創建了domain.com和www.domain.com的綁定。然後,我在我的web.config中的URL重寫規則,調整每一個URL指向https://domain.com
我的問題是,當我去http://domain.com或https://domain.com現場工作,但http://wwww.domain.com和https://www.domain.com沒有。這是我的重寫規則還是我的綁定問題?
這裏是我的參考的web.config:
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" />
</rule>
<rule name="Imported Rule 1">
<match url="^(register)$" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Redirect" url="https://domain.com/register.php" redirectType="Found" />
</rule>
</rules>
</rewrite>
</system.webServer>