> I was stuck on trying to figure out how to
> create a URL pattern that would match anything BUT a particular
> pattern.
You can use the negative lookahead for that. Here's part of our pound.cfg
that redirects based on the user agent (known scrapers and spam bots),
except for certain urls:
Service "scrapers"
URL "^/(?!access_restricted\.htm)"
URL "^/(?!contact\.pl)"
URL "^/(?!img/)"
URL "^/(?!.+\.css)"
URL "^/(?!.+\.js)"
HeadRequire "User-Agent:.*(Microsoft URL Control|Microsoft
Office|Wget|curl|AdobeAIR|Apache|Brutus|ColdFusion|DataCha0s|DTS
Agent|BackStreet Browser|Firebat|Web Downloader|Offline
Explorer|Internet-exprorer|Indy Library|Gigamega|compatible ;
MSIE|EmailCollector|LiteFinder|Missigua|MJ12bot|Nutch|OCP
HRS|Jenaie|libwww|HistoryHound|HttpClient|HTTrack|HTTP
Fetcher|Snoopy|WebCopier|XMLHTTP)"
Redirect
"http://XXXXXXXX/access_restricted.htm<http://xxxxxxxx/access_restricted.htm>
"
End
Personally, what I really wish pound config supported is an OR flag for URLs
(Apache mod_rewrite style). So instead of writing something like:
URL "^/(blah-one|blah-two|blah-three|foo-\n+|.........)\.pl"
I could write a more readable, and in turn less prone to mis-configuration
issues once you get a few dozens of URLs in the list, way:
URL "^/blah-one\.pl" [OR]
URL "^/blah-two\.pl" [OR]
URL "^/blah-three\.pl" [OR]
...........
Or is there already a way to do just that that I'm not aware of?
-Mike
--
To unsubscribe send an email with subject unsubscribe to [EMAIL PROTECTED]
Please contact [EMAIL PROTECTED] for questions.