summaryrefslogtreecommitdiffstats
path: root/htaccess_template
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2012-06-03 09:24:23 -0700
committerArun Persaud <arun@nubati.net>2012-06-03 09:24:23 -0700
commitee441e7cba2a15b7a617f103b511545f4029a174 (patch)
tree0f99e6c5dccdc8b767a8b0c965164a592c8657ef /htaccess_template
parent20cba444993baea357308bf746d3675438c548bc (diff)
downloadphoto-tags-ee441e7cba2a15b7a617f103b511545f4029a174.tar.gz
photo-tags-ee441e7cba2a15b7a617f103b511545f4029a174.tar.bz2
photo-tags-ee441e7cba2a15b7a617f103b511545f4029a174.zip
add autoversioning of css and js files
automatically add the md5 hash to the filename and then use .htaccess to filter it out again. This way we don't need to change the filename and the client can cache correctly
Diffstat (limited to 'htaccess_template')
-rw-r--r--htaccess_template5
1 files changed, 4 insertions, 1 deletions
diff --git a/htaccess_template b/htaccess_template
index aa6f5a7..d4ba12a 100644
--- a/htaccess_template
+++ b/htaccess_template
@@ -6,8 +6,11 @@ RewriteBase /<insert web base url here>
# 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]
-# make the url nice and clean; the comments shows an url that should be matched
+
+### make the url nice and clean; the comments shows an url that should be matched
# web_base/tag/me+berlin/pic/id
RewriteRule tag/([-_\s,a-zA-Z0-9+]*)/pic/([0-9]*) index.php?tag=$1&pic=$2 [L]