Last active
May 19, 2016 07:37
-
-
Save markhowellsmead/4a8b6bec277bb903b5f9 to your computer and use it in GitHub Desktop.
CSS file versioning using htaccess file (Apache config)
This file contains hidden or 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
# CSS file versioning using htaccess file (Apache config) | |
# Link to the file style.123456.css and the server will deliver style.css | |
# Change the number and the web browser will see it as a different file | |
# and force it to be loaded afresh | |
# permanenttourist.ch | [email protected] | 6/2014 | Free use, no credit required | |
# Warning: use only numeric sequences for the version reference! | |
# Warning: if a file with the actual name really exists, it will be served! | |
RewriteCond %{REQUEST_FILENAME} !-s | |
RewriteRule ^(.*)\.[\d]+\.(css|js)$ $1.$2 [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment