According to Owen Boyle: > When we index the site, we use www.banana.com and use the directive: > > url_part_aliases: http://www.banana.com *1 > > So that the db contains no site-specific data. > > Now when someone runs htsearch, the results are generated and htsearch > uses the directive above to re-insert the URL. But now everyone sees > http://www.banana.com on the results page - even if they visited our > site using www.kiwi.com. > > I've checked the docs pretty thoroughly and know that neither > server_alias nor allow_virtual_hosts will help... What we really need is > an intelligent url_part_aliases which will reflect the $HTTP_HOST in the > substitution, e.g. > > url_part_aliases: $HTTP_HOST *1 > > But such a thing doesn't exist - right?
Correct, you can't refer to environment variable in configuration attribute definitions, but you can use them in htsearch output templates. > Workarounds are; > > - separate DBs, configs etc. for each ServerAlias (big waste of space, > files, effort). No, you don't need separate DBs, as you've already figured out how to ensure that the db contains no site-specific data. You could get by with separate configs referring to the same db. Better yet, you can strip off the hostname completely from the URL in htsearch's definition of url_part_aliases, and leave it to the browser to add it back. > - a wrapper as reported in the mailing archive by Gilles R. Detillieux > (http://www.htdig.org/mail/2001/01/0085.html) but this involves an extra > script and forces us to use the GET method. Otherwise, it's a good > solution and is the one we have adopted at the moment (thanks Gilles!). > > Has anyone else come across this problem and how did they solve it? Yes, Joe Jah and I helped out Nick Boyce back in September with much the same problem. Unfortunately, with no easy way to search the Geocrawler archives, it's hard to find answers posted after January 2001. See http://www.geocrawler.com/mail/msg.php3?msg_id=6703330&list=8822 http://www.geocrawler.com/mail/msg.php3?msg_id=6708501&list=8822 and http://www.geocrawler.com/mail/msg.php3?msg_id=6715961&list=8822 The bug Joe mentioned in 3.1.5 is fixed in 3.1.6, so use that. -- Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil Dept. Physiology, U. of Manitoba Phone: (204)789-3766 Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930 _______________________________________________ htdig-general mailing list <[EMAIL PROTECTED]> To unsubscribe, send a message to <[EMAIL PROTECTED]> with a subject of unsubscribe FAQ: http://htdig.sourceforge.net/FAQ.html

