.htaccess filename-based cache busting, etc #771

Closed
devinrhode2 opened this Issue Dec 5, 2012 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

devinrhode2 commented Dec 5, 2012

Having some issues using the built dist directory of the app. yeoman renames the actual files to have the filename hash, but there is no .htaccess rule to match /scripts/bookmarklet.js to /scripts/b3b4bd.bookmarklet.js

  1. We should change the RewriteRule to be on by default. We should also change the RewriteRule to match letters and digits, not just digits:

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+).(\w+).(js|css|png|jpg|gif)$ $1.$3 [L]
  2. We should put the filename hash just before the file extension to work with this rule.
Owner

sindresorhus commented Jan 30, 2013

I'm not sure why this matter, the usemin task should handle this transparently. If it doesn't. File a bug over here: https://github.com/yeoman/grunt-usemin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment