leilukin-tumbleblog/.htaccess

62 lines
2.7 KiB
ApacheConf
Raw Normal View History

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-08-30 05:52:46 +00:00
RewriteCond %{HTTP_USER_AGENT} (AI2Bot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Ai2Bot-Dolma) [NC,OR]
2024-08-19 16:21:02 +00:00
RewriteCond %{HTTP_USER_AGENT} (Amazonbot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Applebot-Extended) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Bytespider) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (CCBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (ChatGPT-User) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Claude-Web) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (ClaudeBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Diffbot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (FacebookBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (FriendlyCrawler) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (GPTBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Google-Extended) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (GoogleOther) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (GoogleOther-Image) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (GoogleOther-Video) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (ICC-Crawler) [NC,OR]
2024-10-01 05:18:26 +00:00
RewriteCond %{HTTP_USER_AGENT} (ISSCyberRiskCrawler) [NC,OR]
2024-08-19 16:21:02 +00:00
RewriteCond %{HTTP_USER_AGENT} (ImagesiftBot) [NC,OR]
2024-10-05 07:30:19 +00:00
RewriteCond %{HTTP_USER_AGENT} (Kangaroo\ Bot) [NC,OR]
2024-08-19 16:21:02 +00:00
RewriteCond %{HTTP_USER_AGENT} (Meta-ExternalAgent) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Meta-ExternalFetcher) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (OAI-SearchBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (PerplexityBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (PetalBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (Scrapy) [NC,OR]
2024-10-05 07:30:19 +00:00
RewriteCond %{HTTP_USER_AGENT} (Sidetrade\ indexer\ bot) [NC,OR]
2024-08-19 16:21:02 +00:00
RewriteCond %{HTTP_USER_AGENT} (Timpibot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (VelenPublicWebCrawler) [NC,OR]
2024-09-29 01:55:21 +00:00
RewriteCond %{HTTP_USER_AGENT} (Webzio-Extended) [NC,OR]
2024-08-19 16:21:02 +00:00
RewriteCond %{HTTP_USER_AGENT} (YouBot) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (anthropic-ai) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (cohere-ai) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (facebookexternalhit) [NC,OR]
2024-09-29 01:55:21 +00:00
RewriteCond %{HTTP_USER_AGENT} (iaskspider/2.0) [NC,OR]
2024-08-19 16:21:02 +00:00
RewriteCond %{HTTP_USER_AGENT} (img2dataset) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (omgili) [NC,OR]
2024-09-29 01:55:21 +00:00
RewriteCond %{HTTP_USER_AGENT} (omgilibot) [NC]
2024-08-19 16:21:02 +00:00
RewriteRule .* https://nocommercialuse.org/ [L]