Block All Requests From User Agents


/ Published in: Apache
Save to your folder(s)

It's possible to block all unwanted user agents that might be potentially harmful or perhaps just to keep the server load as low as possible.


Copy this code and paste it in your HTML
  1. #Block bad bots
  2. SetEnvIfNoCase user-Agent ^FrontPage [NC,OR]
  3. SetEnvIfNoCase user-Agent ^Java.* [NC,OR]
  4. SetEnvIfNoCase user-Agent ^Microsoft.URL [NC,OR]
  5. SetEnvIfNoCase user-Agent ^MSFrontPage [NC,OR]
  6. SetEnvIfNoCase user-Agent ^Offline.Explorer [NC,OR]
  7. SetEnvIfNoCase user-Agent ^[Ww]eb[Bb]andit [NC,OR]
  8. SetEnvIfNoCase user-Agent ^Zeus [NC]
  9. <limit get="" post="" head="">
  10. Order Allow,Deny
  11. Allow from all
  12. Deny from env=bad_bot
  13. </limit>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.