mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Block Bad Website Bots and Spiders
Piped way to add bad crawlers to blocked list, that are slowing and consuming most of the traffic . The other way would be the rDNS
This commit is contained in:
parent
b247cafa36
commit
1503c9fa00
1 changed files with 6 additions and 0 deletions
|
@ -1,4 +1,10 @@
|
|||
# BEGIN Expires Don't forget to enable mod_headers and mod_expires, you can do so by running a2enmod rewrite and a2enmod headers
|
||||
|
||||
#Block Bad Website Bots and Spiders.
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTP_USER_AGENT} ^.*(SCspider|BLEXBot|Textbot|s2bot|MJ12bot|CCBot|SemrushBot|SeznamBot|GrapeshotCrawler|Adsbot|PetalBot|Bytespider|ZoominfoBot|Nuclei|Barkrowler|Barkrowler|AhrefsBot|MegaIndex|CriteoBot|NetSystemsResearch|CensysInspect).*$ [NC]
|
||||
RewriteRule .* - [F,L]
|
||||
|
||||
<ifModule mod_expires.c>
|
||||
ExpiresActive On
|
||||
ExpiresDefault "access plus 1 seconds"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue