Skip to content

Instantly share code, notes, and snippets.

@atstyle
Created January 23, 2014 05:46
Show Gist options
  • Save atstyle/8573558 to your computer and use it in GitHub Desktop.
Save atstyle/8573558 to your computer and use it in GitHub Desktop.
高速化 .htaccess
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
<FilesMatch ".(flv|gif|jpe?g|png|ico|swf|js|css|pdf)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>
# explicitly disable caching for scripts and other dynamic files
<FilesMatch ".(pl|php|cgi|spl|scgi|fcgi)$">
Header unset Cache-Control
</FilesMatch>
<FilesMatch "\.ico\.gz$">
ForceType image/x-icon
AddEncoding x-gzip .gz
</FilesMatch>
FileETag None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment