Replace spaces in User Agent names with wildcard
This commit is contained in:
parent
974a3dea62
commit
346398e85a
|
@ -16,6 +16,6 @@ RewriteEngine on
|
||||||
|
|
||||||
# Block bad bots
|
# Block bad bots
|
||||||
{% for bot in robots.htaccess -%}
|
{% 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 -%}
|
{% endfor -%}
|
||||||
RewriteRule .* https://nocommercialuse.org/ [L]
|
RewriteRule .* https://nocommercialuse.org/ [L]
|
Loading…
Reference in New Issue