Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Auszug aus einer .htaccess mit Caching-Mechanismen
# CHARSET
AddDefaultCharset utf-8
# DEFLATE
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css
AddOutputFilterByType DEFLATE application/javascript application/json
AddOutputFilterByType DEFLATE text/xml application/xml
AddOutputFilterByType DEFLATE application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE application/x-httpd-php
</IfModule>
# CACHE
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType text/html "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/rss+xml "access plus 0 seconds"
</IfModule>
# HEADER
<IfModule mod_headers.c>
Header append Cache-Control "public"
Header append Vary Accept-Encoding
Header unset ETag
</IfModule>
# FILETAG
<IfModule mod_headers.c>
FileETag None
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.