Reputation: 2363
My Tomcat web app has this path:
http://192.168.0.1/app/
How to create a alias for it like this (don't want to type the app
)?
http://192.168.0.1/
I'm not allowed to change the server-mapping
in web.xml
.
I tried the Tuckey URLRewrite
<rule>
<from>/</from>
<to type="redirect">/app/</to>
</rule>
But when try to access the http://192.168.0.1/
, it makes the URL becomes this and doesn't work.
http://192.168.0.1/app/app/app/app/app/app/app/app/app/
Upvotes: 1
Views: 781
Reputation: 47
Try this instead
<rule>
<from>^/*</from>
<to type="redirect">/app/</to>
</rule>
Upvotes: 1