title: rewrite rules messing up web api 2 /token
body: <p>I'm trying to get an angularjs + web api 2 with OAuth. Basically I select individual accounts from the Visual Studio ASP.NET Web Application template.</p>
  
  <p>I need a rewrite for the angular stuff but I'm finding that makes it so I can't get my /token for the OAuth stuff? How can these 2 play nice?</p>
  
  <pre><code>&lt;rewrite&gt;
        &lt;rules&gt;
          &lt;rule name="angularjs routes" stopProcessing="true"&gt;
            &lt;match url=".*" /&gt;
            &lt;conditions logicalGrouping="MatchAll"&gt;
              &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
              &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&gt;
              &lt;add input="{REQUEST_URI}" pattern="^/(api)" negate="true" /&gt;
            &lt;/conditions&gt;
            &lt;action type="Rewrite" url="/" /&gt;
          &lt;/rule&gt;
        &lt;/rules&gt;
  </code></pre>