Well in the end I couldn’t get this to work. Too noob. So I’ve settled on old school versioning. Not really an issue in the end as the extra overhead (working on a duplicated and renamed the CSS file) is no big deal.
CSS caching was an issue waiting to jump out at me. In the end it’s covered.
.htaccess has whooped my ass again – but I’ll be back.
Great tip from Ask Apache. This one is a couple of tips down from here. A real beauty. Imagine working on a live site – you’re just updating your CSS – but this is cached. Now you change the include file which has your HTML head calling yours CSS file. Bingo – site-wide updated CSS. Brilliant.
Pasted here for posterity.
Cache-Friendly File Names
/zap/j/anything-anynumber.js to /zap/j/anything.js and /zap/c/anything-anynumber.css to /zap/c/anything.cssRewriteRule ^zap/(j|c)/([a-z]+)-([0-9]+).(js|css)$ /zap/$1/$2.$4 [L]