I have an AngularJS application running under a Tomcat 7 server, where the app lives in ~/tomcat/webapps/web-client/.
I'm trying to configure the server such that a refresh, or otherwise playing with the URL will redirect to
http://server:8080/web-client/index.html.
Using Tuckey UrlRewrite, I have this in my urlrewrite.xml:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite
PUBLIC "-//tuckey.org//DTD UrlRewrite 4.0//EN"
"http://www.tuckey.org/res/dtds/urlrewrite4.0.dtd">
<urlrewrite>
<rule>
<from>/(.*)$</from>
<to type="redirect">/web-client/index.html</to>
</rule>
</urlrewrite>
This works for anything like
server:8080/whatevergarbage,
but not
server:8080/web-client/moregarbage.
I've tried adding use-context in the urlrewrite.xml file, as well as turning on crossContext in the server.xml file:
Also added a base tag to index.html.
I'm pretty sure I just don't understand the problem completely...