[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: html question: setting relative path to cgi-bin script



Earlier this week, I posted about a problem with the mh-book
package.  My cgi search engine link to "/cgi-bin/mh-book-index"
won't work if users have invoked the docs using
file:/usr/doc/mh-book/html/index.html rather than
http://localhost/doc/mh-book/html/index.html and I don't want to
fully specify the search engine as
http://SERVERNAME/cgi-bin/mh-book-index because then I'd have to
modify the file in /usr/doc to add the server name (which I'd
have to guess or query for in postinst).  I also don't want to use
http://localhost so that the search engine works for accesses
from the outside (since http://SERVER/doc/mh-book is accessible
anyway). 

I now see that dhelp (/usr/doc/HTML/index.html) also has this
problem (it calls it's search engine as a link to /cgi-bin/dsearch)
so at least I'm not alone.  It's search engine is also broken if
called from file:/usr/doc/HTML/index.html

Is it wise to assume that users who have a httpd server will call
the docs as http://SERVERNAME/doc/mh-book/... and not as
file:/usr/doc/mh-book/... ?  I presume not.

If I do decide to guess or query for the SERVERNAME, I suppose
it's not okay to modify a file in /usr/doc/mh-book to add it,
right?  I should symlink to a file in /var/lib/mh-book/html or
something? 

Thanks,
Peter


Reply to: