From 9d189605d5ccdbd7125f2e8839c63fa2028d44c1 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Tue, 8 May 2012 20:42:59 -0700 Subject: auto-versioning for js and css files. Needs .htaccess to be installed The md5 of the file will be added to the filename of the .js or .css file. .htaccess will remove these again, but the browser will be able to cache correctly now. --- htaccess.template | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 htaccess.template (limited to 'htaccess.template') diff --git a/htaccess.template b/htaccess.template new file mode 100644 index 0000000..351842c --- /dev/null +++ b/htaccess.template @@ -0,0 +1,10 @@ +RewriteEngine on + +# need to set this to your web path +RewriteBase / + +# hide git directory (and others) +RedirectMatch 404 \.(git|cvs|svn|bzr|hg)(/.*|$) + +# use autoversioning of js and css files +RewriteRule ^(.*)\.[[:xdigit:]]{32}\.(css|js)$ $1.$2 [L] -- cgit v1.2.3-18-g5258