title: How can I use a catch all route using `path` or `re_path` so that Django passes all unmatched requests to my index view?
body: <p>My url patterns look like this:</p>
  
  <pre><code>urlpatterns = [
      path('admin/', admin.site.urls),
      path('api/', include('api.urls')),
  
      re_path('.*', IndexView.as_view()),
  ]
  </code></pre>
  
  <p>This works but it matches <em>all</em> URLs, including those prefixed with <code>admin</code> and <code>api</code>. I want those URLs to still match, and for any unmatched URLs to render <code>IndexView</code>.</p>
  
  <p>Before 2.0 I used this regex for this purpose. I tried using it in <code>re_path</code> but that didn't work, which is what led me to trying the above. </p>
  
  <pre><code>url(r'^(?P&lt;path&gt;.*)/$', HtmlView.as_view())
  </code></pre>
  
  <p>Use case is a SPA where I handle 404s client side. </p>
  
  <p>Many thanks in advance.</p>