httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "System Support" <supp...@microtechniques.com>
Subject mod_rewrite
Date Tue, 21 Oct 2008 21:14:56 GMT
I am having trouble getting the external program option of RewriteMap to 
work.

RewriteMap convert rnd:/path/to/rnd/file
and
RewriteMap convert txt:/path/to/txt/file
and
RewriteMap convert int:tolower

all work as expected.

RewriteMap convert prg:/path/to/prg/file

does not work, and the program does not even seem to be called.

RewriteMap convert prg:/bad/path/no/file

does not work, and does not throw any error. Whereas

RewriteMap convert txt:/bad/path/no/file

does not work but does thrown an error for each url.


The location,owner, and permissions of the files are the same as other cgi 
scripts that do work.

The only error that shows up in any file is a error for the unconverted url.

The expected configuration lines show in the Apache Server Information 
report:

Current Configuration:
    In file: /etc/apache2/local.d/misc.conf
       6: RewriteLog "/var/run/rewrite.log"
       7: RewriteLock "/var/run/rewrite.lck"
       8: RewriteLogLevel 4
    In file: /etc/apache2/vhosts.d/test.conf
       5: <VirtualHost 10.xxx.xxx.xxx:xx>
      13:   RewriteMap convert prg:/path/rewrite.pl

The above line was the only one that I change for the different tests 
mentioned above.

      46:   <Directory "/www/xxx">
      51:     RewriteEngine On
      52:     RewriteBase /
      53:     RewriteRule ^.*fix /${convert:$1} [L]
        :   </Directory>
        : </VirtualHost>


For the program I am using the example perl script given in the Apache 
mod_rewrite documention.  It works as expected when run from the 
command line.

The rewrite log file is created,  but stays empty even when the request is 
sucesfully rewritten (i.e. I get the expected image in the browser when using 
the txt: and rnd: options).

I am running a locally compiled Apache 2.2.9 under SuSE 11, but have the 
same problem with 
the 2.2.8 SuSE binary version supplied with the OS.

...don

support (at) microtechniques.com



Mime
View raw message