I have a rewrite rule for my "Default Web Site" (aka at my wwwroot's web.config) to redirect all HTTP request to HTTPS as follows:
<rule name="http to https" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
</rule>
Now I want to disable or exclude a Virtual Directory under this so I can reach that only with HTTP. How to do this?
What I have tried: Creating a rule that matches the virt.dir's name, and chose to stop any further action (no success):
<rule name="testsite no https" enabled="true" stopProcessing="true">
<match url="(testsite)" ignoreCase="true" />
<action type="None" />
<conditions>
<add input="{URL}" pattern="(testsite)" />
</conditions>
</rule>
Added a negate condition for the first rule (no success)
<add input="{URL}" pattern="(testsite)" negate="true" />
What am I doing wrong?