I\'m trying to figure out the way how to setup Apache Tomcat server to serve angular application with deep links. For example:
A static server routinely returns ind
For fixing the deep link issue when deploying angular application (with PathLocationStrategy routing) on apache tomcat server (8, 9) -
server.xml -
...
...
...
rewrite.config - (note - /hello/ is the context path of the angular app on tomcat)
RewriteCond %{REQUEST_PATH} !-f
RewriteRule ^/hello/(.*) /hello/index.html
I have documented this issue in my article - Fixing deep linking issue – Deploying angular application on Tomcat server
Note - there is no client side setup needed for achieving this (apart from the default config coming out of CLI). All the client side routing is handles by the Angular Routing module.