Created
May 30, 2011 16:02
-
-
Save michaelcontento/999081 to your computer and use it in GitHub Desktop.
RewriteRule with md5 cachebusting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
# Rewrite all URLs with md5 cachebusting | |
# e.g. /e0d97534e77671a12012a9a1effc3bda/css/style.css -> /css/style.css | |
RewriteRule ^[A-Z0-9]{32}/(.*)$ $1 [NC,N] | |
# Based on the Zend Framework manual | |
# see: http://framework.zend.com/manual/1.11/en/project-structure.rewrite.html | |
RewriteCond %{REQUEST_FILENAME} -s [OR] | |
RewriteCond %{REQUEST_FILENAME} -l [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^.*$ - [NC,L] | |
RewriteRule ^.*$ index.php [NC,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment