Re: [htdig] Cgi-wrap causing incorrect URL for Next Pages

Gilles Detillieux (
Thu, 11 Mar 1999 11:35:37 -0600 (CST)

According to Gordon Elliot:
> My ISP has cgi-wrap installed and in my Virtual Host section in the conf
> file, has a line which reads:
> ScriptAlias /cgi-bin/
> /usr/local/apache/cgi-bin/cgiwrap/infozoid/
> Everything installed with no problem and when I ran the first search,
> everything went fine. However, if I tried to run a second search from the
> results page, htdig would attempt to find htsearch at:
> /cgi-bin/infozoid/
> instead of:
> /cgi-bin/htsearch
> I was able to fix this by hardcoding the header.html file in the 'common'
> directory to read, /cgi-bin/htsearch , in the <form action ......> line,
> replacing $(CGI) . However, I can't seem to find any way to fix the same
> problem which occurs when trying to access a Next Page, 1, 2, 3, etc.,
> which all try to go to:
> instead of:
> Any help in getting 'next pages' to report the correct URL would be greatly
> appreciated -- in laymens terms, please, I am not a programmer.

Can you program a simple shell script? Basically, what you want to do
is add yet another wrapper script, to fix up the environment variable that
cgiwrap seems to change. So, rename your htsearch program to htsearch.real,
and replace htsearch with a script like this:


SCRIPT_NAME=`echo "$SCRIPT_NAME" | sed 's|infozoid/||'`
/path/to/your/own/installed/htsearch.real ${@+"$@"}

Gilles R. Detillieux              E-mail: <>
Spinal Cord Research Centre       WWW:
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930
To unsubscribe from the htdig mailing list, send a message to containing the single word "unsubscribe" in
the SUBJECT of the message.

This archive was generated by hypermail 2.0b3 on Mon Mar 15 1999 - 08:57:46 PST