Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<LocationMatch "\/(images)\/.*\.(ico|pdf|flv|jpe?g|png|gif|js|css|swf)">
# Set far future expires
RewriteEngine on
RewriteCond %{REQUEST_URI} \.(css|js|jpe?g|png|gif|ico) [NC]
RewriteCond %{QUERY_STRING} [0-9]+$
RewriteRule ^(.*)$ $1 [E=VERSIONED_FILE:1,L]
Header add "Expires" "Mon, 28 Jul 2014 23:30:00 GMT" env=VERSIONED_FILE
Header add "Cache-Control" "max-age=315360000" env=VERSIONED_FILE
Header unset ETag
FileETag None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment