Skip to content

Instantly share code, notes, and snippets.

@stalinkay
Forked from NinjaPress/.htaccess
Created April 27, 2022 12:48
Show Gist options
  • Save stalinkay/fc1c2e8f3890bffa823566241e9553ad to your computer and use it in GitHub Desktop.
Save stalinkay/fc1c2e8f3890bffa823566241e9553ad to your computer and use it in GitHub Desktop.
Evitando bots e user-agents maliciosos via .htaccess do Wordpress
#Block Against User-Agents and Bots
<IfModule mod_setenvif.c>
SetEnvIfNoCase User-Agent ^$ keep_out
SetEnvIfNoCase User-Agent (casper|cmsworldmap|diavol|dotbot) keep_out
SetEnvIfNoCase User-Agent (flicky|ia_archiver|jakarta|kmccrew) keep_out
SetEnvIfNoCase User-Agent (libwww|planetwork|pycurl|skygrid) keep_out
SetEnvIfNoCase User-Agent (purebot|comodo|feedfinder|turnit) keep_out
SetEnvIfNoCase User-Agent (zmeu|nutch|vikspider|binlar|sucker) keep_out
<Limit GET POST PUT>
Order Allow,Deny
Allow from all
Deny from env=keep_out
</Limit>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment