title: IIS rewrite rules not working as expected
body: <p>I have researched this item thoroughly and am, in my opinion, doing the right thing. However, it's not working so my opinion must be wrong! </p>
  
  <p>I have a website in which all the content is in wwwroot or other folders.
  I am trying to get HTML5 URLs to work. 
  The website is presented with 5 URL types.</p>
  
  <ol>
  <li>An empty URL.</li>
  <li>A URL intended for a physical file, e.g., a css, html or js file</li>
  <li>A URL /api/... to access Resources</li>
  <li>A URL /oauth/token for authentication</li>
  <li>An HTML5 type url, say /aboutus</li>
  </ol>
  
  <p>I have the following rewrite rules in web.config</p>
  
  <pre><code>    &lt;rule name="index.html as document root" stopProcessing="true"&gt;
        &lt;match url="^$" /&gt;
        &lt;action type="Rewrite" url="/wwwroot/index.html" /&gt;
      &lt;/rule&gt;
      &lt;rule name="static dist files" stopProcessing="true"&gt;
        &lt;match url="^(.+)$" /&gt;
        &lt;conditions&gt;
          &lt;add input="{APPL_PHYSICAL_PATH}wwwroot\{R:1}" matchType="IsFile" /&gt;
        &lt;/conditions&gt;
        &lt;action type="Rewrite" url="/wwwroot/{R:1}" /&gt;
      &lt;/rule&gt;
      &lt;rule name="api call" stopProcessing="true"&gt;
        &lt;match url="^/api/" /&gt;
        &lt;action type="None"/&gt;
      &lt;/rule&gt;
      &lt;rule name="authorization call" stopProcessing="true"&gt;
        &lt;match url="^/oauth/token$" /&gt;
        &lt;action type="None"/&gt;
      &lt;/rule&gt;
      &lt;rule name="reroute html5 to index.html" stopProcessing="true"&gt;
        &lt;match url="^.+$" /&gt;
        &lt;action type="Rewrite" url="/wwwroot/index.html" /&gt;
      &lt;/rule&gt;
  </code></pre>
  
  <p>I can't see what I am doing wrong. The documentation I can find for "stopProcessing" is imprecise but I am assuming that it means if the rule is matched, do not process any more rules.</p>
  
  <p>What is happening is that no calls to the API or for authentication are handled correctly - by Debugging the API is not called and instead it appears to be rewritten to wwwroot/index.html.</p>
  
  <p>I am sure I am doing something really simple wrong, but I have tried everything I can think of that makes sense.</p>
  
  <p>Any help appreciated.</p>
  
  <p>The server is using OWIN with JWT and the frontent is AngularJS. I am using VS2015 Community for development.</p>