Solution:
I misunderstood the way the url rewriting worked. I had installed the rewriter under ~/tomcat/webapps/ROOT/WEB-INF
, when it really needed to be under the application folder:
~/tomcat/webapps/web-client/WEB-INF
.
So, now URLs under server:8080/web-client/
are redirected correctly.
In case it helps someone else out in the future, this is my urlrewrite.xml file:
<urlrewrite use-context="false">
<rule enabled="true">
<note>Do not process URL ending at index.html</note>
<from>/index.html$</from>
<to last="true">-</to>
</rule>
<rule enabled="true">
<note>Do not process URLs targeting assets</note>
<from>/assets/</from>
<to last="true">-</to>
</rule>
<rule enabled="true">
<note>Do not process calls to restservice</note>
<from>/restservice/</from>
<to last="true">-</to>
</rule>
<rule enabled="true">
<note>Do not process mocks</note>
<from>/mocks/</from>
<to last="true">-</to>
</rule>
<rule enabled="true">
<note>Process any URL without 'index', send to /web-client/index.html</note>
<from>^(?!index).*$</from>
<to type="redirect">%{context-path}/index.html</to>
</rule>
</urlrewrite>