title: Having trouble getting ASP.NET URL rewrite to exclude a specific file
body: <p>I want to redirect all HTTP requests to my site to HTTPS except for the file "/blah.txt".  Here's the basic rewriting rule I've been trying.  I've tried to use {REQUEST_FILENAME} and {URL}.  I've tried several different patterns that I thought should match.</p>
  
  <p>The rule below redirect <strong>every</strong> request to HTTPS <strong>including</strong> requests for blah.txt</p>
  
  <pre><code>        &lt;rewrite&gt;
          &lt;rules&gt;
              &lt;clear /&gt;
              &lt;rule name="Redirect to HTTPS" stopProcessing="true"&gt;
                  &lt;match url="(.*)" /&gt;
                  &lt;conditions logicalGrouping="MatchAll" trackAllCaptures="false"&gt;
                      &lt;add input="{HTTPS}" pattern="^OFF$" /&gt;
                      &lt;add input="{REQUEST_FILENAME}" matchType="Pattern" pattern="blah\.txt$" ignoreCase="true" negate="true" /&gt;
                  &lt;/conditions&gt;
                  &lt;action type="Redirect" url="https://{HTTP_HOST}/{R:1}" /&gt;
              &lt;/rule&gt;
          &lt;/rules&gt;
      &lt;/rewrite&gt;  
  </code></pre>