aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/apache/templates/vhost_fcgid.conf8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/apache/templates/vhost_fcgid.conf b/modules/apache/templates/vhost_fcgid.conf
index f137c866..0643cac9 100644
--- a/modules/apache/templates/vhost_fcgid.conf
+++ b/modules/apache/templates/vhost_fcgid.conf
@@ -19,7 +19,9 @@ RewriteRule . - [R=403,L]
# directory or downloading a specific version of a file.
# Note: eliminating view=log and annotate= doesn't make much difference to the
# CPU load when robots are hitting the server in real world operation.
-RewriteCond %{QUERY_STRING} pathrev=|r1=
+#RewriteCond %{QUERY_STRING} pathrev=|r1=
+# Treat anything other than a plain path as "expensive"
+RewriteCond %{QUERY_STRING} .
RewriteCond %{HTTP_USER_AGENT} "Googlebot|GoogleOther|bingbot|Yahoo! Slurp|ClaudeBot|Amazonbot|YandexBot|SemrushBot|Barkrowler|DataForSeoBot|PetalBot|facebookexternalhit|GPTBot|ImagesiftBot|spider|Spider|iPod|Trident|Presto"
RewriteRule . - [R=403,L]
@@ -28,7 +30,9 @@ RewriteRule . - [R=403,L]
# back. This will block requests from user agents that do not support
# JavaScript, which includes many robots.
RewriteMap urlescape prg:/usr/local/bin/urlescape
-RewriteCond %{QUERY_STRING} pathrev=|r1=
+#RewriteCond %{QUERY_STRING} pathrev=|r1=
+# Treat anything other than a plain path as "expensive"
+RewriteCond %{QUERY_STRING} .
RewriteCond %{REQUEST_URI} !/_check
RewriteCond %{HTTP_COOKIE} !session=([^;]+) [novary]
RewriteRule . %{REQUEST_SCHEME}://%{SERVER_NAME}:%{SERVER_PORT}/_check?to=%{REQUEST_URI}?${urlescape:%{QUERY_STRING}} [R=302,L]