Page is a not externally linkable
andreasfriedrich - 1:25 pm on Sep 26, 2002 (gmt 0)
You are right in mentioning that the matching should be case insensitive (the NC flag). The '.*', however, is not neccessary, since in With '^httrack' the pattern is anchored at the beginning, with httrack$ at the end of the string. When you anchored your pattern at the start and end you would need the '.*' if you wanted to match httrack in a string that is not just 'httrack'. Your pattern would need to look like this: '^.*httrack.*$'. Note that this pattern does not make sense, unless you would want to grab the substring before and after the httrack. To sum up, here is a chart of the four options mentioned above. NA = not anchored; BA = anchored at beginning; EA = anchored at end; MS = modified suggestion. 1. achttrackac (NA: +; BA: -; EA: -; MS: +;) Note that '.*' will match the '' string, since the quantifier * greedily (rather more than less) matches 0 or more times.
So, this might be better as far as I can see:
RewriteCond %{HTTP_USER_AGENT} .*httrack.* [NC,OR]
2. htTracKacac (NA: +; BA: +; EA: -; MS: +;)
3. aacaHttrack (NA: +; BA: -; EA: +; MS: +;)