On 12.9.2002 20:19 Uhr, Gilles Detillieux <[EMAIL PROTECTED]> wrote:
> I can only think of two workarounds, but I fear the first one would be > impractical in your case. > > 1) If you only have to deal with a limited amount of dynamic numbers in > URLs, you can make symbolic links of all of them. E.g.: > > cd /path/to/local > ln -s 7 . > ln -s 1234 . > ln -s 5678 . > ln -s 20020121102215 . > > Then you could use "local_urls: http://a12345.g.akamai.net/=/path/to/local/" > and the dynamic part of the URL would then essentially get swallowed > up by all the symbolic links you created. Of course, if you're dealing > with lots of numbers, this would quickly get out of hand. > > 2) You can modify Retriever::GetLocal(), in htdig/Retriever.cc, to > detect and strip out the dynamic components of the URLs when looking > for a match with the stored "prefixes" from local_urls. E.g. instead of > using mystrncasecmp(), or after using mystrncasecmp() if it failed, use > a function that you write which will do simple wildcard matching for you. > Then use "local_urls: http://a12345.g.akamai.net/*/DB/=/path/to/local/DB/" > where the "*" would be intercepted by your matching function to swallow > as many characters as needed to get a match. Thanks a lot Gilles, unfortunately solution 1) won't work as the dynamic part is a TIMESTAMP and can really be anything. AND as I am not a programmer, solution 2) is just above my head ;-) Any plans to get pattern matching for local_urls in a future htdig version? My current workarround is to add a HOST entry into /etc/hosts which at least maps the akamai server to my local server (and then catch the funny url on my webserver and rewrite it with mod_rewrite) so I don't have to pay for bandwith. Being able to use local_urls with patern matching would however speed things up a bit. -- <http://www.StefanSeiz.com> Spamto: <[EMAIL PROTECTED]> ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ 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

