as2 wrote:
Hi,
I am trying to add a rule ..
Try this :
# First, all URLs that start with "/app/" and end in either .jsp, .htm
# or .html are forwarded to Tomcat
<LocationMatch "^/app/.+\.(jsp|html?)$">
SetHandler jakarta-servlet
</LocationMatch>
# But, we don't want that if it's inside of "/app/dir/"
<LocationMatch "^/app/dir/">
SetHandler none
</LocationMatch>
# Except if it is inside of a "/jsp/" subdir of "/app/dir",
# then we do want it anyway
<LocationMatch "^/app/dir/.*/jsp/">
SetHandler jakarta-servlet
</LocationMatch>
You may need to modify that a bit, according to what you want exactly
(which is not so clear in your original question).
But the base is :
- <Location> and <LocationMatch> are applied one after the other, in
the order in which they appear in the configuration file.
(See : http://httpd.apache.org/docs/2.2/sections.html )
- "SetHandler jakarta-servlet" makes it so that all applicable URLs are
proxied to Tomcat
- "SetHandler none" cancels the effect of a previous "SetHandler
jakarta-servlet" and returns to the default Apache handling.
(See : http://httpd.apache.org/docs/2.2/mod/core.html#sethandler )
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org