tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brendan Benke" <be...@impulseradio.com>
Subject Here we go again - mod_webapp and mod_rewrite
Date Wed, 07 Aug 2002 14:46:14 GMT
i originally posted this to tomcat-users, but i think it might be better
served here.

i know this topic is old and has been discussed at length before, i'm still
having trouble finding an elegant solution.  i used to use apache with
mod_jserv and some simple url rewriting.   moving to tomcat, i have
encountered problems with mod_webapp and mod_rewrite.  specifically, the
original URI being rewritten instead of just passed through.

for example:  (these are nested inside VirtualHost tags)

==================
    ApJServMount /servlets ajpv12://localhost:8007/root

<IfModule mod_rewrite.c>
       RewriteEngine on
       RewriteCond %{REQUEST_URI} !^/ir/images
       RewriteCond %{REQUEST_URI} !^/ir/html
       RewriteCond %{REQUEST_URI} !^/ir/applets
       RewriteCond %{REQUEST_URI} !^/ir/dtds
       RewriteCond %{REQUEST_URI} !^/index.html
       RewriteRule ^/.*  /servlets/RequestHandler [PT]
</IfModule>

==================

used to work with ApacheJServ and  ApacheModuleRewrite.dll while

==================
 WebAppConnection warpConnection warp localhost:8008

<IfModule mod_rewrite.c>
       RewriteEngine on
       RewriteCond %{REQUEST_URI} !^/ir/images
       RewriteCond %{REQUEST_URI} !^/ir/html
       RewriteCond %{REQUEST_URI} !^/ir/applets
       RewriteCond %{REQUEST_URI} !^/ir/dtds
       RewriteCond %{REQUEST_URI} !^/index.html
       RewriteRule ^/.*  /site/servlet/RequestHandler [PT]
</IfModule>

  WebAppDeploy site warpConnection /site
==================
doesn't work at all.  using the [R] flag does sucessfully redirect the
rewritten request, but the new URI is used instead of the old, as was the
behavior under JServ.

can anyone point me in the right direction here?  i've seen home-brew
patches to various connection handlers that see to fudge the behavior i'm
looking for, but certainly there must be something i'm missing.

i'm using:
tomcat 4.0.4
apache 1.3.26
windows 2000

any help much appreciated!!!!

brendan



--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message