in reply to setting up a perl module to replace Apache's autoindex
If I understood correctly, you want Drall to be called with the current location whenever a file index.html isn't found. You can do as follow.
Replace the redirect to Drall with a call to a printenv script:
DirectoryIndex index.html /cgi-bin/printenv.pl
This way, whenever you visit a location without index.html, you get redirected to the script. If now you look at what printenv.pl says, you will see many headers prefixed by REDIRECT_, and the uri you were looking for is in REDIRECT_REQUEST_URI.
So, the solution is to substitute printenv.pl with a script which issues a redirect to Drall with the correct paramaters, something like
use CGI; $redir = '/cgi-bin/drall.pl?left='. $ENV{REDIRECT_REQUEST_URI}; print CGI::redirect(-uri => $redir);
Hope this helps! Ciao, Valerio
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
thanks valdez
by khopesh (Initiate) on Aug 01, 2002 at 14:21 UTC | |
by valdez (Monsignor) on Aug 01, 2002 at 16:05 UTC |