You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tim Kientzle <ki...@acm.org> on 2000/07/21 01:38:37 UTC
mod_rewrite and mod_jserv
I'm trying to arrange for a servlet to transparently handle
certain HTML requests. For example, requests for
http://my.site/foo/some/path/
should be processed as if the user requested
http://my.site/mywebapp/servlet/MyServlet/bar/some/path/
I've done similar things with CGI scripts by using mod_rewrite:
RewriteRule ^foo/(.*) /mywebapp/servlet/MyServlet/bar/$1
But I can't get this to work. I'm comfortably certain I'm
using mod_rewrite correctly (in particular, this works if
I add a redirect modifier [R], so I know that the rewrite
engine is on and the rewrite base is set correctly).
I've tried several variations:
* Placed mod_rewrite immediately before and immediately
after mod_jserv in the LoadModule and AddModule lists
* Using rewrite modifiers [T=jserv-action] or [PT]
So far, I've had no luck. Has anyone successfully done this?
One other note: Tomcat is displaying error messages about:
Context: Status code:404 request:R( + / + /foo/some/path/) msg:null
This suggests to me that mod_jserv is being invoked, but isn't
seeing the rewritten path; I thought that [PT] was supposed to
address this sort of problem?
- Tim