diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/apache/templates/vhost_fcgid.conf | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/apache/templates/vhost_fcgid.conf b/modules/apache/templates/vhost_fcgid.conf index c44f9ea6..288b5aa2 100644 --- a/modules/apache/templates/vhost_fcgid.conf +++ b/modules/apache/templates/vhost_fcgid.conf @@ -18,7 +18,12 @@ RewriteRule . - [R=403,L] # bunch). "Expensive" is considered to be most operations other than showing a # directory or downloading a specific version of a file. RewriteCond %{QUERY_STRING} pathrev=|annotate=|view=log|r1= -RewriteCond %{HTTP_USER_AGENT} "Googlebot|bingbot|Yahoo! Slurp|ClaudeBot|Amazonbot|YandexBot|SemrushBot|Barkrowler|DataForSeoBot|PetalBot|facebookexternalhit|GPTBot|spider|Spider" +RewriteCond %{HTTP_USER_AGENT} "Googlebot|bingbot|Yahoo! Slurp|ClaudeBot|Amazonbot|YandexBot|SemrushBot|Barkrowler|DataForSeoBot|PetalBot|facebookexternalhit|GPTBot|ImagesiftBot|spider|Spider" +RewriteRule . - [R=403,L] + +# Block abusive spiders by IP address who don't identify themselves in the +# User-Agent: string +RewriteCond expr "-R '47.76.99.0/24' || -R '47.76.209.0/24'" RewriteRule . - [R=403,L] ErrorDocument 403 "<html><body>Impolite robots are not allowed</body></html>" |