I want to direct any link other than a static resource (e.g. js, images, etc.) to my index.html. I have made the following changes.
I added a context.xml
in app.war/META-INF
directory that contains:
<Context>
<Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
</Context>
I also have rewrite.config
in app.war/WEB-INF
directory that contains:
RewriteCond %{REQUEST_URI} ^/(css|img|js|partials|rest|favicon).*$
RewriteRule ^.*$ - [L]
RewriteRule ^.*$ /index.html [L,QSA]
However, with the above settings, what happens is that all of my js and css files show index.html
contents (in browser console). Could you please suggest what would be the issue here?