tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Kientzle <kient...@acm.org>
Subject mod_rewrite and mod_jserv
Date Thu, 20 Jul 2000 23:38:37 GMT
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

Mime
View raw message