I want to read the static files of my website using this kind of URLs:
[i]{filename}.{timestamp}.{extension}[/i]
ex. [b]jquery.1234567890.js[/b]
The idea is to control what version of the file is being cached by the browser.
Then when I ask nginx to serve the file, I would like to serve directly the [b]jquery.js[/b] file.
So I'm dealing with some kind of rewrite.
I know where I have to put it, but not how...
[code]
server {
...
location ~* ^.+\.(css|gif|jpg|js|png|swf)$ {
[b]rewrite rule goes here[/b];
root /home/web/statics/;
expires 90d;
add_header Cache-Control public;
}
}
[/code]
Thanks for the help.
Edited 1 time(s). Last edit at 06/08/2010 07:19AM by illarra.