title: <some-valid-url>/<some-name>.m is going into infinite loop. Springboot + Mustache template + Angular
body: <p>I have one spring boot + mustache project which is service the angular build as static resource.</p>
  <p>It's working properly for all the urls except urls with .m extensions</p>
  <p>For e.g. if I hit</p>
  <p>http://localhost:8080/bank/login -- it works</p>
  <p>http://localhost:8080/bank/login123 (invalid) -- it redirects to the /login page (i have redirection login for 404 error)</p>
  <p>http://localhost:8080/bank/login.html(invalid) -- it redirects to the /login page</p>
  <p><strong>http://localhost:8080/bank/login.m(invalid)</strong> -- it goes into infinite loop (culprit is .m)</p>
  <p>Any idea what's wrong with *<strong>.m</strong> urls</p>
  <p>Below is the redirection logic if the url is not found</p>
  <pre><code> @GetMapping(&quot;/error&quot;)
  public ModelAndView handler404(HttpServletRequest request) {
  if (statusCode != null &amp;&amp; statusCode == HttpStatus.NOT_FOUND.value()) {
              
  
              return new ModelAndView(&quot;forward:/bank/login&quot;);
          } 
    }
  </code></pre>
  <p>The code is on corporate network so can't share much of it but if you looking for specific piece I can provide.</p>
  <p>Any help is much appreciated.</p>