2024-08-20 00:52:03 +00:00
|
|
|
<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>
|
|
|
|
|
2024-08-19 16:21:02 +00:00
|
|
|
# Template to enable clean URLs for the Apache web server.
|
|
|
|
<IfModule mod_rewrite.c>
|
|
|
|
RewriteEngine On
|
|
|
|
RewriteBase /
|
|
|
|
RewriteRule ^.+\.twig$ index.php [L]
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteCond %{REQUEST_URI} ^/admin/.+
|
|
|
|
ReWriteRule ^.+$ /admin/index.php [L]
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteRule ^.+$ index.php [L]
|
|
|
|
</IfModule>
|
|
|
|
|
|
|
|
# Block bad bots
|
2024-11-08 15:17:14 +00:00
|
|
|
RewriteCond %{HTTP_USER_AGENT} (AI2Bot|Ai2Bot-Dolma|Amazonbot|Applebot-Extended|Bytespider|CCBot|ChatGPT-User|Claude-Web|ClaudeBot|Diffbot|DuckAssistBot|FacebookBot|FriendlyCrawler|GPTBot|Google-Extended|GoogleOther|GoogleOther-Image|GoogleOther-Video|ICC-Crawler|ISSCyberRiskCrawler|ImagesiftBot|Kangaroo.*Bot|Meta-ExternalAgent|Meta-ExternalFetcher|OAI-SearchBot|PerplexityBot|PetalBot|Scrapy|Sidetrade.*indexer.*bot|Timpibot|VelenPublicWebCrawler|Webzio-Extended|YouBot|anthropic-ai|cohere-ai|facebookexternalhit|iaskspider/2.0|img2dataset|omgili|omgilibot) [NC]
|
2024-08-19 16:21:02 +00:00
|
|
|
RewriteRule .* https://nocommercialuse.org/ [L]
|