From c7a152df770f39b7683f511e0c2b229447a3560c Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 6 Feb 2020 02:59:44 +0000 Subject: [PATCH] limit google a bit... --- ext/index/main.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ext/index/main.php b/ext/index/main.php index fcb017ec..b1931da3 100644 --- a/ext/index/main.php +++ b/ext/index/main.php @@ -45,6 +45,15 @@ class Index extends Extension try { $fast_page_limit = 500; + if( + SPEED_HAX + && strstr($_SERVER["HTTP_USER_AGENT"], "Googlebot") !== false + && count($search_terms) > 1 + ) { + // googlebot loves searching for weird combinations of tags... + $fast_page_limit = 50; + } + if (SPEED_HAX && $page_number > $fast_page_limit && !$user->can("big_search")) { $this->theme->display_error( 404,