<VirtualHost*:80># ...<LocationMatch"^/assets/.*$"># Some browsers still send conditional-GET requests if there's a# Last-Modified header or an ETag header even if they haven't# reached the expiry date sent in the Expires header.#Header unset Last-Modified#Header unset ETagFileETag Size
# RFC says only cache for 1 yearExpiresActiveOnExpiresDefault"access plus 1 year"SetEnv no-gzip
RewriteEngineon#RewriteLog /tmp/rewrite.log#RewriteLogLevel 15# Make sure the browser supports gzip encoding before we send itRewriteCond %{HTTP:Accept-Encoding} \b(x-)?gzip\b
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.+) \$1.gz [L]
</LocationMatch><FilesMatch\.css\.gz$>ForceType text/css
Header set Content-Encoding gzip
</FilesMatch><FilesMatch\.js\.gz$>ForceType text/javascript
Header set Content-Encoding gzip
</FilesMatch></VirtualHost>