- Version: 0.3.1
- Description: Filename-based cache busting for WordPress scripts/styles. Based on a modified version of the original plugin.
- Authors: Dominik Schilling, KimchaC, and Exove
- License: GPLv2 or later
Apache — add to your .htaccess
:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)\.(?:\d+)\.(min.js|min.css|js|css)($|\?.*$) $1.$3 [L]
</IfModule>
Nginx — add to the server
block:
location ~* ^(.+)\.(?:\d+)\.(min.js|min.css|js|css)($|\?.*$) {
try_files $uri $1.$2;
}
Doesn't touch scripts and styles from /wp-includes
(since this plugin doesn't properly work with them).