leilukin-site/src/.htaccess.njk

21 lines
579 B
Plaintext
Raw Normal View History

---
permalink: .htaccess
eleventyExcludeFromCollections: true
eleventyAllowMissingExtension: true
---
2024-07-28 12:16:16 +00:00
ErrorDocument 404 /404.html
<FilesMatch "\.(ico|svg|avif|webp|jpg|jpeg|png|gif|woff2)$">
Header set Cache-Control "max-age=31536000, public"
</FilesMatch>
<FilesMatch "\.(css|js)$">
Header set Cache-Control "no-cache, public"
2024-08-19 16:23:00 +00:00
</FilesMatch>
2024-08-19 16:25:02 +00:00
RewriteEngine on
2024-08-19 16:23:00 +00:00
# Block bad bots
{% for bot in robots.htaccess -%}
RewriteCond %{HTTP_USER_AGENT} ({{ bot | replace(" ", ".*") }}) [NC{% if not loop.last %},OR{% endif %}]
{% endfor -%}
2024-08-19 16:23:00 +00:00
RewriteRule .* https://nocommercialuse.org/ [L]