Forum Moderators: phranque
I tried to reply but was unable to, hence the new topic.
I tried adding
# Block Java and Python URLlib except from Google and Yahoo Python
RewriteCond %{HTTP_USER_AGENT} ^(Python[-.]?urllib¦Java/?[1-9]\.[0-9]) [NC]
RewriteCond %{REMOTE_ADDR}!^207\.126\.2(2[4-9]¦3[0-9])\.
RewriteCond %{REMOTE_ADDR}!^216\.239\.(3[2-9]¦[45][0-9]¦6[0-3])\.
RewriteRule .* - [F]
However, the server throws up a 500. When I use just
^(Java/?[1-9]\.[0-9) then it works perfectly as checked from wannabrowser [wannabrowser.com]
However, using
^(Python[-.]?urllib¦Java/?[1-9]\.[0-9]) [NC] doesn't block the java user agent.
Finally, I tried adding the last two lines to allow google and yahoo, but then got the 500 error.
Any suggestions / solutions. I am a bit worried I block out Google and Yahoo bots while trying to block the bad Java ones.