diff options
Diffstat (limited to 'modules/apache')
-rw-r--r-- | modules/apache/templates/vhost_fcgid.conf | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/apache/templates/vhost_fcgid.conf b/modules/apache/templates/vhost_fcgid.conf index 17b2bb06..c44f9ea6 100644 --- a/modules/apache/templates/vhost_fcgid.conf +++ b/modules/apache/templates/vhost_fcgid.conf @@ -13,4 +13,12 @@ FcgidIdleTimeout 30 RewriteEngine on RewriteCond %{HTTP_USER_AGENT} ClaudeBot|Amazonbot RewriteRule . - [R=403,L] + +# Block expensive SVN operations on all common robots ("spider" covers a +# 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" +RewriteRule . - [R=403,L] + ErrorDocument 403 "<html><body>Impolite robots are not allowed</body></html>" |