1 Reply Latest reply on Jun 19, 2007 3:57 AM by jfclere

    mod_rewrite, or context path : can't seem to figure out eith

      I'm trying to get my webapp working under JBoss Web server but am having troubling dealing with the static content. I'd like to setup a path (virtual directory) to a static location, probably in the server's data directory, and tried using a context path under the host in jbossweb.sar/server.xml but that didn't work.

      then i looked into mod_rewrite stuff and attempted to get Apache to serve my static content that way. Unfortunately, there don't seem to be any concrete examples out there for getting this to work on JBoss Web. i added the valve to the server.xml as described on http://labs.jboss.com/file-access/default/members/jbossweb/freezone/modules/rewrite/index.html and put a rewrite.properties file in server/myserver/conf, but that didn't work. Even tried it in my war's WEB-INF but that didn't do it either. basically i want http://localhost:8080/static/imagefile.gif to go to http://localhost/static/imagefile.gif. here's my rewrite.properties..

      RewriteCond %{REQUEST_URI} ^/static/*
      RewriteRule ^/static(.*) http://%{HTTP_HOST}/static/$1 [L]
      



      any help, either method, is greatly greatly appreciated. thanks. ... .joe