2016-09-09 121 views
0

我必须为以下内容添加规则,并且无法使其工作。 该网站可通过https www.domain.com获取。证书只适用于此。如果我尝试使用https domain.com,则会出现404错误。我如何从https domain.com重定向到https www.domain.com?需要为IIS重写的规则https

任何想法?

我已经覆盖当有人使用http und将被重定向到https。

对不起,我无法编写完整的网址,因为我没有足够的声望。所以我剪下://

回答

0

你可以试试这个

<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="SeeOther" /> 
</rule> 
+0

不幸的是,没有工作。此外,我没有运气加入“www”。 ' Harald