How to convert a subdomain to a path with Embedded Tomcat 8 and Spring boot
问题 How to rewrite subdomains to paths? Example: foo.bar .example.com --> example.com /foo/bar Or better would be (reverse folders): foo.bar .example.com --> example.com /bar/foo Requesting foo.bar .example.com should ship a file in /src/main/resources/static/ bar/foo /index.html. With Apache2 it is done by mod_rewrite . I found documentation about rewriting with Tomcat 8 but the question is where to put this files using spring boot? Update I tried using the UrlRewriteFilter, but it seems not