On Thu, 27 Sep 2001, Nick wrote:

> Date: Thu, 27 Sep 2001 02:55:48 +0100
> From: Nick <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [htdig] Can url_part_aliases Include CGI Variable Value ?
> 
> I have ht://dig 3.1.5 running on a server (Redhat 5.2,Apache 1.3.20)
> which is known by various different DNS & NetBIOS names (in fact some
> users address it by IP address only, or use their own server-name that
> I can't predict) - due to it being connectable from very separate
> networks via firewalls & NAT.  So I've been trying to configure
> ht://dig to return search results with URLs expressed in terms of the
> URL the caller supplied when they connected in the first place.
> 
> But either I don't understand the required syntax, or you can't use
> the CGI variable SERVER_NAME as part of the "url_part_aliases"
> directive in htdig.conf.  
> 
> Assuming I have the "start_url" specified as "http://123.123.123.123";,
> I've been trying :
> 
>   url_part_aliases: $(SERVER_NAME) 123.123.123.123
> 
> and variations on the variable name syntax, such as ${SERVER_NAME},
> $&(SERVER_NAME), $%(SERVER_NAME), etc.  Some of these "work" but give
> search result URLs like 
> 
>   http://(SERVER_NAME)/mypath/mydoc.html
> 
> while other syntax variations just give "unexpected error running
> ht://dig - url_part_aliases needs an even number of strings but an odd
> number was specified - please contact your sysadmin" type messages.
> 
> Is what I want possible ?
> If so, can anyone help me out ?

All you need is relative URLs; however, 3.1.5 has a bug that you need to
patch against before producing relative URLs; here is the patch:

  ftp://ftp.ccsf.org/htdig-patches/3.1.5/url_part_aliases.0

If by any chance you have applied dateRange.1 patch to 3.1.5 that patch
won't work for you; use the following patch instead:

  ftp://ftp.ccsf.org/htdig-patches/3.1.5/url_part_aliases4dateRange.0

Do one better and upgrade to 3.1.6 instead;)  here is the latest snapshot:

  http://www.htdig.org/files/snapshots/

To use the url_part_aliases attribute you'll need to set up a config
file for indexing and a separate one for searching.

htdig.conf:
url_part_aliases:    http://123.123.123.123/    *1

htsearch.conf:
url_part_aliases:    /                          *1

See:    http://www.htdig.org/attrs.html#url_part_aliases

Regards,

Joe
-- 
     _/   _/_/_/       _/              ____________    __o
     _/   _/   _/      _/         ______________     _-\<,_
 _/  _/   _/_/_/   _/  _/                     ......(_)/ (_)
  _/_/ oe _/   _/.  _/_/ ah        [EMAIL PROTECTED]


_______________________________________________
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

Reply via email to