tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Barth <>
Subject Serving static content with Apache Webserver using mod_webapp (WARP) and mod_rewrite
Date Tue, 30 Apr 2002 15:31:14 GMT

I found my solution for deploying webapps with mod_webapp and serving only 
dynamic content directly with apache.

In my case, I wanted the document root level to be dynamic, so mounting my 
app into a subdirectory didnĀ“t work for me.

So I wrote:

RewriteEngine On
RewriteRule ^/static/(.*)$   /static/$1   [L]
RewriteRule ^/(.+)\.gif$     $1.gif    [L]
WebAppDeploy ROOT warpconn /

and - IT WORKS! Apache with active mod_rewrite seems to omit checking if 
mod_webapp likes to serve the URL unless you specify [PT] in the flags of 
the rewrite rule.

Hope it helps


Thorsten Barth

Web Arts AG
eConsulting eStrategy eSuccess
Max-Planck-Str. 9
61381 Friedrichsdorf
Tel.: +49.6172.599833
Fax : +49.6172.599830

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message