I\'m really stuck on this one...
Basically, I\'m trying to make 2 pages always over SSL using the URLRewrite add-on for IIS. But I also need to force all other pages to
So what I ended up doing is:
Since the pages use relative paths, they automatically use the styles/images over HTTP/HTTPS respectively.
<rewrite>
<rules>
<rule name="Force HTTPS Login" stopProcessing="true">
<match url="(.*)/login.aspx" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:0}" redirectType="Permanent" />
</rule>
<rule name="Others Force HTTP" stopProcessing="true">
<match url="(((.*)/login.aspx)|((.*)/styles(.*))|((.*)/images(.*)))" negate="true" />
<conditions>
<add input="{HTTPS}" pattern="^ON$" />
</conditions>
<action type="Redirect" url="http://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>