> I have had great success with using htdig. But now I ran into a bit > of a problem. This isn't a fault of htdig though. > > We have decided to take our internal htdig search live. The problem > is that the htdig search is behind a load balancer and DMZ. So I can > perform the htdig search properly by using the IP address of the local > machine (i.e. 10.32.0.1) but can not search and index by using the name > assigned to it to the external world (i.e. http://www.ourcompany.com). > What I was wondering is if there is an easy way to replace all instances > of: > > 10.32.0.1 > > to > > http://www.ourcompany.com > > when doing our indexes? > > Will 'url_rewrite_rules' or 'url_part_alias' be able to do this task? > I'm not at all familiar with regex replacement which these two seem to > use. > ... > > Ok, so I will answer my own question. > > I managed to solve my problem by using 'search_rewrite_rules' in my > htdig.conf file > > I did something like the following: > > search_rewrite_rules: http://10.32.0.1(*.) http://www.ourcompany.com\\1 > > This did the exact job I wanted it to do.
...but it only kicks in when searching. Another possibility is to use two separate config files for indexing and searching, with url_part_aliases: http://10.32.0.1/ *site*/ in the config file used for indexing, and url_part_aliases: http://www.ourcompany.com/ *site*/ in the config file used for searching ("*site*" is just a placeholder that can be replaced by any other string that doesn't appear in any of the indexed URLs). That way, the database contains "*site*" which can easily be replaced by any URL prefix you want. Combine that with the "include" directive to have the rest of the configuration read from a common file, and you're well set. cu, Martin P.S.: I absolutely *love* the configurability of ht://Dig! -- | Martin Vorlaender | OpenVMS rules! OpenVMS: Where do you | work: [EMAIL PROTECTED] want to BE today? | http://www.pdv-systeme.de/users/martinv/ | home: [EMAIL PROTECTED] ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ ht://Dig general mailing list: <[EMAIL PROTECTED]> ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html List information (subscribe/unsubscribe, etc.) https://lists.sourceforge.net/lists/listinfo/htdig-general

