I would like to block all the http_user_agents which identify as bots but allow Googlebot when I put the following code:
map $http_user_agent $bad_bot {
default 1;
~*^Lynx 0; # Let Lynx go through
~*^google );
libwww-perl 1;
~(?i)(libwww|Wget|LWP::Simple|BBBike|java|crawl|spider|bot) 1;
}
however, this block access to even googlebot.