diff --git a/src/.htaccess.njk b/src/.htaccess.njk index bf343d23..2b3e8d69 100644 --- a/src/.htaccess.njk +++ b/src/.htaccess.njk @@ -16,6 +16,6 @@ RewriteEngine on # Block bad bots {% for bot in robots.htaccess -%} -RewriteCond %{HTTP_USER_AGENT} ({{ bot }}) [NC{% if not loop.last %},OR{% endif %}] +RewriteCond %{HTTP_USER_AGENT} ({{ bot | replace(" ", ".*") }}) [NC{% if not loop.last %},OR{% endif %}] {% endfor -%} RewriteRule .* https://nocommercialuse.org/ [L] \ No newline at end of file