--

I have been able to map all traffice through a given servlet using
mod_rewrite
and the following httpd.conf settings:

--- Begin httpd.conf
....
# Include the configuration files needed for mod_jserv
include "C:/Program Files/Apache Group/Apache JServ/conf/mod_jserv.conf"

LoadModule rewrite_module modules/ApacheModuleRewrite.dll
RewriteEngine on
RewriteLog rewrite.log
RewriteLogLevel 9
RewriteRule ^/(.*) /servlets/SnoopServlet/$1 [PT]

--- End httpd.conf


I had to load the rewrite module after the jserv module in order for the uri
to get rewritten before the jserv_module.jserv_translate_handler translator
was called. This seems to work fine. A request of the form
http://localhost/test
gets mapped into http://localhost/servlets/SnoopServlet/test as seen by
looking
at the SnoopServlet output:

Requested URL:
http://valkyrie.si.com/servlets/SnoopServlet/test/

Request information:
 Request method: GET
 Request URI: /test/
 Request protocol: HTTP/1.1
 Servlet path: /servlets/SnoopServlet
 Path info: /test/
 Path translated: C:\Program Files\Apache
Group\Apache\passthrough:\servlets\SnoopServlet\test\test
 Query string: <none>
 Content length: <none>
 Content type: <none>
 Server name: valkyrie.si.com
 Server port: 80
 Remote user: <none>
 Remote address: 127.0.0.1
 Remote host: <none>
 Authorization scheme: <none>

Ignoring why I might want to do such a thing, is this the best way to do
this? The one thing
I don't like is that in order for this to work the modules must be loaded in
the correct
order. Is there a way this can be achieved without a module ordering
dependency?




********************************************************************************
Bear Stearns is not responsible for any recommendation, solicitation, offer or
agreement or any information about any transaction, customer account or account
activity contained in this communication.
********************************************************************************



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to