summaryrefslogtreecommitdiffstats
path: root/htaccess.template
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2012-05-08 20:42:59 -0700
committerArun Persaud <arun@nubati.net>2012-05-08 20:42:59 -0700
commit9d189605d5ccdbd7125f2e8839c63fa2028d44c1 (patch)
treedf3343a0a368cc12a71da8b7cda8295bbf2bd611 /htaccess.template
parent2fb259fc72129bcb9d209368a97c99638ef77001 (diff)
downloade-DoKo-9d189605d5ccdbd7125f2e8839c63fa2028d44c1.tar.gz
e-DoKo-9d189605d5ccdbd7125f2e8839c63fa2028d44c1.tar.bz2
e-DoKo-9d189605d5ccdbd7125f2e8839c63fa2028d44c1.zip
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.
Diffstat (limited to 'htaccess.template')
-rw-r--r--htaccess.template10
1 files changed, 10 insertions, 0 deletions
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 /<web path to your files>
+
+# 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]