----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Hello!

I have successfully installed JServ 1.1 with Apache 1.3.9 in
Solaris 2.5.1. I read the FAQ and most of the mod_rewrite
related messages in this list and found lots of helpful comments
(thanks for the excellent FAQ!). My problem is similar with most
others in that I need to pass some requests to a single servlet.
I have configured Apache so that mod_jserv and mod_rewrite are
loaded in correct order. Here is my rewrite rule:

RewriteEngine on
RewriteLog "/usr/home/villes/apache/logs/rewrite.log"
RewriteLogLevel 9
RewriteRule  ^/$  /phoenix/com.teamw.phoenix.system.PhxInvoker  [PT]

In my environment I have lots of servlets with suffix ".phx".
This suffix is mapped also to the PhxInvoker servlet in jserv.conf:
ApJServAction .phx /phoenix/com.teamw.phoenix.system.PhxInvoker

The URIs are in format "/service/servlet.phx" with parameters either
in query format or what we call a "virtual path". For example, URI
"/phoenix/ResTree.phx/configuration/phoenix" goes to PhxInvoker,
which loads "com.teamw.phoenix.system.ResTree" class and
passes virtual path "/configuration/phoenix" to it.

My rewrite rule works fine without virtual paths, i.e. the "/" is passed
to PhxInvoker, which loads a default servlet. But when virtual path
is included in the URI, the mod_rewrite seems to handle the request
twice (first with full URI, then with virtual path!). Here is the
rewrite.log with above URI:

141.192.29.35 - - [07/Feb/2000:17:16:38 +0200] [sapporo.sq.icl.
fi/sid#23068][rid#5be10/initial] (2) init rewrite engine with requested uri
/phoenix/ResTree.phx/configuration/phoenix/
141.192.29.35 - - [07/Feb/2000:17:16:38 +0200] [sapporo.sq.icl.
fi/sid#23068][rid#5be10/initial] (3) applying pattern '^/$' to uri
'/phoenix/ResTree.phx/configuration/phoenix/'
141.192.29.35 - - [07/Feb/2000:17:16:38 +0200] [sapporo.sq.icl.
fi/sid#23068][rid#5be10/initial] (1) pass through /phoenix/ResTree.
phx/configuration/phoenix/
141.192.29.35 - - [07/Feb/2000:17:16:38 +0200] [sapporo.sq.icl.
fi/sid#23068][rid#63e80/subreq] (2) init rewrite engine with requested uri
/configuration/phoenix/
141.192.29.35 - - [07/Feb/2000:17:16:38 +0200] [sapporo.sq.icl.
fi/sid#23068][rid#63e80/subreq] (1) pass through /configuration/phoenix/

I read the mod_rewrite document and tried with different flags. I was
hoping mod_rewrite would not do subrequests with flags [PT,NS] or
[PT,L]. But so far, no luck. Is this a known feature or have I missed
something? How can I stop mod_rewrite processing the same URI
twice?

I have been able to pass all requests to PhxInvoker with rule:
RewriteRule  ^(.*) /phoenix/com.teamw.phoenix.system.PhxInvoker  [PT]

This is very good, even the virtual paths work. But I know my boss
doesn't like it because all static HTML pages and CGI scripts are
passed to my servlet. All fancy Apache features are lost...

Any comments are welcome!

Regards,
Ville Silventoinen




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

Reply via email to