Here's the relevant bit of my Web.Config:
<rule name="Force WWW and SSL" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^[^www]" />
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://www.zzz.com/{R:1}" appendQueryString="true" redirectType="Permanent" />
</rule>
It will rewrite http to https but will not add the www as needed by my cms. I've tried several variants of this and it just seems that IIS 8.5 on Win2012R2 refuses to follow the www rule. Any ideas?