Gilles Detillieux writes...
> According to Geoff Hutchison:
> > On Fri, 5 Nov 1999, Rick Richardson wrote:
> > > Problem is, htdig reports this and doesn't index anything.
> > > 
> > >   + htdig -v -v -c /home/httpd/html/rfc/.htdig/htdig.conf -i
> > >   New server: , 0
> > >   Unknown host: 0/robots.txt
> > >   pick: , # servers = 1
> > > Is it currently possible to tell htdig to do what I want to do?
> > 
> > Well, maybe. I'd suggest setting the host to 'localhost' which will work
> > on almost all machines.
> > 
> > The problem is that local_urls doesn't work for everything--it falls back
> > to HTTP for many things, including robots.txt. So it's trying to build a
> > connection to the host you specified, which is the null string. No good.
> > >From this, it worries that it will *ever* be able to make an HTTP
> > connection to the server (it won't) and give up.
> 
> You could always use url_part_aliases to rewrite the urls as you want on
> the target system.  E.g.:
> 
> url_part_aliases:     http://localhost/rfc *rfcs
> 
> for htdig, then
> 
> url_part_aliases:     file:/whatever/path/you/want/rfc *rfcs
> 
> or
> 
> url_part_aliases:     http://my.domain.org/docs/network/rfc *rfcs
> 
> for htsearch on the target system.

Thanks for the tip on url_part_aliases.

A slightly modified version of your approach looks like paydirt.

Here are excerpts from my shell script which creates the index,
showing the config values I'm using.
        
        DIR=rfc
        HERE=/home/httpd/html/$DIR
        DCONF=$HERE/.htdig/htdig.conf
        SCONF=$HERE/.htdig/htsearch.conf

        cat <<EOF >> $DCONF
        database_dir:   $HERE/.htdig/db
        common_dir:     $HERE/.htdig/common
        start_url:      http://localhost/$DIR/
        local_urls:     http://localhost/$DIR/=/home/httpd/html/$DIR/
        local_user_urls:        http:/=/home/,/public_html/
        url_part_aliases:       http://localhost/$DIR *$DIR
        EOF

        cat <<EOF >> $SCONF
        database_dir:   $HERE/.htdig/db
        common_dir:     $HERE/.htdig/common
        start_url:      http://localhost/$DIR/
        local_urls:     http://localhost/$DIR/=/home/httpd/html/$DIR/
        local_user_urls:        http:/=/home/,/public_html/
        url_part_aliases:       http:$DIR *$DIR
        EOF

One last problem seems to be the construction of the search results
HTML page.  The search.html that I populate in $HERE has this
line in it:

        <form method="post" action="http:/cgi-bin/htsearch?-c$SCONF">

However, when htsearch creates the results page, the HTML it
generates omits the -c option:

        <FORM method="get" action="/cgi-bin/htsearch">

Using only the configuration file, how can I convince htsearch to
add the -c option to the HTML it generates?

-Rick

-- 
Rick Richardson  [EMAIL PROTECTED]   http://RickRichardson.freeservers.com/

My current CI is 28.  I'm 41.  I need 14 more cylinders by my next
birthday.  Two PWC's and an SUV ought to do it.  Thats my new goal.

------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.

Reply via email to