From f1053e2e4a9aef5645a0bcdcdabbd647bea75075 Mon Sep 17 00:00:00 2001 From: Tim Veluwenkamp Date: Wed, 16 Sep 2026 06:58:08 +0200 Subject: [PATCH] Refine bot detection logic in layered navigation best-pratice This updates the layered navigation check to match against $args rather than $request_uri. --- ...how-to-fix-performance-issues-caused-by-bots-and-crawlers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/best-practices/performance/how-to-fix-performance-issues-caused-by-bots-and-crawlers.md b/docs/best-practices/performance/how-to-fix-performance-issues-caused-by-bots-and-crawlers.md index 1783a9f2..b682255f 100644 --- a/docs/best-practices/performance/how-to-fix-performance-issues-caused-by-bots-and-crawlers.md +++ b/docs/best-practices/performance/how-to-fix-performance-issues-caused-by-bots-and-crawlers.md @@ -60,7 +60,7 @@ if ($http_user_agent ~* 'http|bot|crawl|spider|GoogleOther') { } # Here, you should define the layered navigation urls. # You should use your own filter keywords here -if ($request_uri ~ 'color=|size=|mode=list|dir=desc|dir=asc') { +if ($args ~* "(^|&)(color|size|mode=list|dir=desc|dir=asc)") { set $layered_navigation 1; } set $bot_and_layered "$is_bot$layered_navigation";