开发者

IIS 7 URL Rewrite for HTTPS

I want to redirect https://example.com to https://www.example.com. I have the following rule for redirecting non www http traffic to https://www . . .

<rule name="WWW Redirect1" stopProcessing="true">
    <match url="(.*)" />
    <conditions>
        <add input="{HTTP_HOST}" pattern="^example\.com$" />
    </conditions>
    <action type="Redirect" url="https://www.example.com/{R:1}" />
</rule>

This will not handle redirecting from https://example.com to https://www.examlple. Right now I currently get the SSL cert error, is it even possible to avo开发者_Go百科id this?


If you are getting an SSL certificate error, it likely means that either

  1. Your web server is not serving up an SSL certificate for https://www.example.com or;

  2. Your SSL certificate is for example.com not www.example.com. In which case, you'll likely need to address that with your SSL certificate provider.

Not sure that it is an issue with code or config....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜