title: Spring Boot redirect all URL to index.html (SPA)
body: <p>Im trying to create a default <strong>RequestMapping</strong> which redirects all requests to <strong>index.html</strong> in my single page application</p>
  
  <p>my current solution is </p>
  
  <pre><code>@RequestMapping(value="/**/{[path:[^\\.]*}")
  public String index() {
      return "index";
  }
  </code></pre>
  
  <p>and in the properties:</p>
  
  <pre><code>spring.mvc.view.prefix=/
  spring.mvc.view.suffix=.html
  </code></pre>
  
  <p>im building an social network and it works if i create paths like</p>
  
  <p><a href="http://localhost:8080/user1337" rel="nofollow noreferrer">http://localhost:8080/user1337</a></p>
  
  <p>but when i use dots in my path it fails:</p>
  
  <p><a href="http://localhost:8080/user.1337" rel="nofollow noreferrer">http://localhost:8080/user.1337</a></p>
  
  <p>i get an error page:</p>
  
  <pre><code>Whitelabel Error Page
  
  This application has no explicit mapping for /error, so you are seeing this as a fallback.
  
  Mon Sep 18 23:19:22 CEST 2017
  There was an unexpected error (type=Not Found, status=404).
  No message available
  </code></pre>