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
Your web server is not serving up an SSL certificate for
https://www.example.com
or;Your SSL certificate is for
example.com
notwww.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....
精彩评论