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]