You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brendan Benke <be...@impulseradio.com> on 2002/08/06 21:52:41 UTC
Here we go again - mod_webapp and mod_rewrite
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>