22 lines
645 B
Plaintext
22 lines
645 B
Plaintext
---
|
|
permalink: .htaccess
|
|
eleventyExcludeFromCollections: true
|
|
eleventyAllowMissingExtension: true
|
|
---
|
|
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"
|
|
</FilesMatch>
|
|
|
|
RewriteEngine on
|
|
|
|
# Redirect obfuscated email links to mailto link
|
|
RewriteRule ^.*{{ sitemeta.siteAuthor.emailDecoyUrl }}.*$ "mailto:{{ sitemeta.siteAuthor.email }}" [R=301,L]
|
|
|
|
# Block bad bots
|
|
RewriteCond %{HTTP_USER_AGENT} ({{ robots.htaccess }}) [NC]
|
|
RewriteRule .* https://nocommercialuse.org/ [L] |