title: Spring Boot 2.1.0 only serve index.html if resource not resolved (SPA, react-router)
body: <p>I am serving an SPA made with create-react-app and react-router using Spring Boot 2.1.0 with this configuration</p>
  
  <pre><code>import org.springframework.context.annotation.Configuration;
  import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
  import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
  
  @Configuration
  public class WebMvcConfiguration implements WebMvcConfigurer {
  
      @Override
      public void addViewControllers(ViewControllerRegistry registry) {
          registry.addViewController("/**/{path:[^\\.]+}")
                  .setViewName("forward:/");
      }
  }
  </code></pre>
  
  <p>Basically what it does is always serve index.html unless there's a period in the path. I would like to align this with create-react-app's provided <code>.htaccess</code>. How can I make Spring Boot match this functionality?</p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
  </code></pre>