I have this file on my web server:
http:
Since all the files inside /static/are cached using CloudFlare Edge Cache, I need a way to change the URL with something similar, so if the file is changed, the new version will be automatically updated:
http:
Where 1234567890 is the timestamp for changing the file date. I am already creating the file name according to the date of change, the problem I encountered is in the .htaccess file.
This works great:
RewriteRule ^(.*)\.[\d]{10}\.(js)$ $1.$2 [L]
It means that:
http:
redirected to:
http:
But this will catch all .js requests from the domain, I just want to catch .js requests from / static / js / min / * .js - but this does not work:
RewriteRule ^static/js/min/(.*)\.[\d]{10}\.(js)$ $1.$2 [L]
What should be the rule?