A guy, a blog and the internet
Apache mod_rewrite tips and tricks
So I was trying to solve a weird redirect issue: Request exceeded the limit of 10 internal redirects due to probable configuration error.
I found this site, which had quite alot of info.
One tip I really liked was:
Cache-Friendly File Names
This is probably my favorite, and I use it on every site I work on. It allows me to update my javascript and css files in my visitors cache’s simply by naming them differently in the html, on the server they stay the same name. This rewrites all files for /zap/j/anything-anynumber.js to /zap/j/anything.js and /zap/c/anything-anynumber.css to /zap/c/anything.css
RewriteRule ^zap/(j|c)/([a-z]+)-([0-9]+)\.(js|css)$ /zap/$1/$2.$4 [L]
| Print article | This entry was posted by Clifford W. Hansen on August 15, 2009 at 18:41:31, and is filed under Debian, Web. Follow any responses to this post through RSS 2.0. Both comments and pings are currently closed. |
Comments are closed.