Hi all,

        We have a system that has recently been converted from JServ to Tomcat and
one of our Rewrite rules stopped working. The rules are as follows:

        RewriteEngine On
        RewriteLog "/usr/local/apache/logs/rewrite.log"
        RewriteCond %{QUERY_STRING}             wondernet.oneclickview
[NC]
        RewriteCond %{QUERY_STRING}             !passthroughparams
[NC]
        RewriteRule !^/cgi-bin/passthroughparams.cgi            -       [C]
        RewriteRule ^/twn(.*)$
/usr/local/apache/cgi-bin/passthroughparams.cgi  \

[E=VGKK_PARAMS:$1?%{QUERY_STRING},T=application/x-httpd-cgi,L]


The rewrite logs are:

192.168.50.253 - - [23/May/2001:12:03:22 +0900]
[ec.twn.ne.jp/sid#81061dc][rid#80de464/initial] (2) rewrite /twn ->
/usr/local/apache/cgi-bin/passthroughparams.cgi
192.168.50.253 - - [23/May/2001:12:03:22 +0900]
[ec.twn.ne.jp/sid#81061dc][rid#80de464/initial] (5) setting env variable
'VGKK_PARAMS' to '?vgform=wondernet.oneclickview&
URL_STUB=http%3A%2F%2Fcastle.twn.ne.jp%2Fcontents%2Fmember%2Fcgi%2Ftelno%2Fp
reentry.cgi&SKU=P11-25-00069&host=johnnys&x=78&y=28'
192.168.50.253 - - [23/May/2001:12:03:22 +0900]
[ec.twn.ne.jp/sid#81061dc][rid#80de464/initial] (2) remember
/usr/local/apache/cgi-bin/passthroughparams.cgi to have MIME-
type 'application/x-httpd-cgi'
192.168.50.253 - - [23/May/2001:12:03:22 +0900]
[ec.twn.ne.jp/sid#81061dc][rid#80de464/initial] (2) local path result:
/usr/local/apache/cgi-bin/passthroughparams.cgi
192.168.50.253 - - [23/May/2001:12:03:22 +0900]
[ec.twn.ne.jp/sid#81061dc][rid#80de464/initial] (1) go-ahead with
/usr/local/apache/cgi-bin/passthroughparams.cgi [OK]
192.168.50.253 - - [23/May/2001:12:03:22 +0900]
[ec.twn.ne.jp/sid#81061dc][rid#80de464/initial] (1) force filename
/usr/local/apache/cgi-bin/passthroughparams.cgi to have
 MIME-type 'application/x-httpd-cgi'



        The thing is that when we have the JkMount in the config file then,
despite the log saying "go-ahead with...", the
"/usr/local/apache/cgi-bin/passthroughparams.cgi" file is not running. It
appears that Apache passes control to Tomcat before actually running the
file. We have debugging code in the cgi file that is not running at all. If
we take out the JkMounts and leave everthing else the same then things work
fine.
        BTW, don't let the fact that the script is in the CGI-bin directory
confuse you. It is just a Perl script, its location is not imortant.

        So, is there anyway to make sure the script is run before the hand off to
Tomcat?



Thanks,

--Rainer

Reply via email to