Forum Moderators: open
SetEnvIf User-Agent ^Mozilla.* good_guysWill allow those bots that are not even honorable enough to say who they are. You can't really block bad bots by UA because as lucy24 mentioned, they wear disguises. We all wish it were that simple, but to keep unwanted traffic out, UA is not as predictable as IP. It takes some access log wrangling to determine what behavior you want to allow, and where the unwanted behavior is coming from.
My solution is: if it comes from the SE's larger BOT range (eg /24)
Legitimate Google bots only come from the ranges 66.249.64-79
All the rest of the Google ranges are from their vast catalog of tools.
classicman - why only allow google? There are a good handful of bots that return useful traffic, including bing and yandex.
There is no need for any of the .* in your examples, because you're not capturing. Do use ^ anchors where appropriate.is telling you to drop the .* in your example. You can use the forum search or visit the Library of this forum for examples and some enduring information about what you are trying to do. People are taking their time to help, but you need to make the effort because there is no easy, one-size-fits all way to do what you have stated are your goals.