title: uWSGI routing rule is overriding static files
body: <p>I'd like the following route behavior:</p>
  
  <ul>
  <li>Any path that exists in <code>webapp/static/</code> should be routed to that file</li>
  <li>Any other path that doesn't start with <code>/auth</code> or <code>/api</code>should be routed to <code>webapp/static/pages/index.html</code></li>
  <li>Route remaining requests to my uwsgi app.</li>
  </ul>
  
  <p>I have the following uWSGI configuration:</p>
  
  <pre><code>[uwsgi]
  http-socket = :$(PORT)
  master = true
  processes = 4
  die-on-term = true
  module = webapp:app
  memory-report = true
  
  ;HSTS
  route-host = ^localhost:(?:[0-9]+)$ goto:localhost
  route-if-not = equal:${HTTP_X_FORWARDED_PROTO};https redirect-permanent:https://${HTTP_HOST}${REQUEST_URI}
  route-if = equal:${HTTP_X_FORWARDED_PROTO};https addheader:Strict-Transport-Security: max-age=31536000; preload
  
  route-label = localhost
  check-static = %v/webapp/static/
  route = ^(/?|/(?!(auth.*|api.*))(.*))$ static:%v/webapp/static/pages/index.html
  </code></pre>
  
  <p>The problem is that the final route rule is overriding the static files handler, even if I change their order..  Previously, I used the regex <code>^/?$</code> to only send requests to <code>/</code> to the index page, which worked perfectly, so it must have something to do with how the regex works.</p>