From dfc929ad08a20abe596994d1a55814dbb4c48955 Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Sat, 5 Oct 2024 15:30:19 +0800 Subject: [PATCH] Escape whitespace in user agent names --- .htaccess | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.htaccess b/.htaccess index 7bf4421..f062a9d 100644 --- a/.htaccess +++ b/.htaccess @@ -20,7 +20,6 @@ RewriteRule ^.+$ index.php [L] # Block bad bots -RewriteEngine On RewriteCond %{HTTP_USER_AGENT} (AI2Bot) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (Ai2Bot-Dolma) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (Amazonbot) [NC,OR] @@ -41,14 +40,14 @@ RewriteCond %{HTTP_USER_AGENT} (GoogleOther-Video) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (ICC-Crawler) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (ISSCyberRiskCrawler) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (ImagesiftBot) [NC,OR] -RewriteCond %{HTTP_USER_AGENT} (Kangaroo Bot) [NC,OR] +RewriteCond %{HTTP_USER_AGENT} (Kangaroo\ Bot) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (Meta-ExternalAgent) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (Meta-ExternalFetcher) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (OAI-SearchBot) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (PerplexityBot) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (PetalBot) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (Scrapy) [NC,OR] -RewriteCond %{HTTP_USER_AGENT} (Sidetrade indexer bot) [NC,OR] +RewriteCond %{HTTP_USER_AGENT} (Sidetrade\ indexer\ bot) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (Timpibot) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (VelenPublicWebCrawler) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (Webzio-Extended) [NC,OR]