Re: Essential stuff in /usr/doc (Was Re: Installing things into a...)
On Wed, 26 May 1999, Peter S Galbraith wrote:
> > Peter> (I have a perhaps similar problem with mh-book: I wrote a cgi-bin
> > Peter> search engine that returns URLs like file:/usr/doc/mh-book/...
> > Peter> and so it won't really work for remote hosts accessing mh-book
> > Peter> through http://SERVER_NAME/doc/mh-book; the solution is probably
> > Peter> to return http://SERVER_NAME/doc/mh-book URLs instead of
> > Peter> file:/usr/doc/mh-book because that also works locally but then I
> > Peter> have to parse config files to get the SERVER_NAME like dwww does.
> > Peter> I assume I can't expect $ENV{SERVER_NAME} to work for all
> > Peter> cgi-bin capable web servers as it does for Apache)
> >
> > But not all cgi-bin capable browsers ;-)
>
> I think I'll simply check $ENV{SERVER_NAME} and use it if
> defined. That will cover a good proportion of cases anyway.
Um, just a suggestion, but why not just return a page via http that has no
hostname explicitly specified, so that all links and hrefs in it are
relative? i.e., instead of returning a URL of the form
http://SERVER_NAME/doc/mh-book, just return /doc/mh-book
Works for most of my applications, at least.
--
Mike Renfro / Instructor, Basic Engineering Program
931 372-3601 / renfro@tntech.edu
Reply to: