Re: [htdig] URL Munging


Geoff Hutchison (ghutchis@wso.williams.edu)
Sat, 12 Jun 1999 15:20:25 -0400 (EDT)


On Tue, 8 Jun 1999, Tim Dixon wrote:

> works in the first place (e.g.; at what point are these translations
> applied; what's the significance of the *site, *1 and *2 in the example; two
> different configuration files for digging and searching - how?) etc, etc,
> etc....

OK... So the first idea is that you set up two config files. For example,
let's say we'll duplicate htdig.conf for the search version:

cd /opt/htdig/conf
cp htdig.conf search.conf

This is a bit simplistic since there are undoubtedly config attributes
set in your config files that don't apply anymore (i.e. you no longer
need to set search attributes in the dig version...). But then you'll
need to change your search form HTML to something like this:

<input type="hidden" name="config" value="search">

I hope that make sense. Then let's look at the example given in the
documentation:

url_part_aliases: http://search.example.com/~htdig *site \
                            http://www.htdig.org/this/ *1 \
                            .html *2
url_part_aliases: http://www.htdig.org/ *site \
                            http://www.htdig.org/that/ *1 \
                            .htm *2

OK... These are meant for the dig and search config files
respectively. The first defines that the first word of each line is
transformed into the second for each URL.

http://search.example.com/~htdig -> *site

OK, now the search config says that the reverse transformations are
performed:

*site -> http://www.htdig.org/

The net transformations are:
http://search.example.com/~htdig -> http://www.htdig.org/
http://www.htdig.org/this/ -> http://www.htdig.org/that/
.html -> .htm

Does this make sense?

-Geoff Hutchison
Williams Students Online
http://wso.williams.edu/

------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig@htdig.org containing the single word "unsubscribe" in
the SUBJECT of the message.



This archive was generated by hypermail 2.0b3 on Sat Jun 12 1999 - 17:25:01 PDT