only html file no-cache

codetr nginx-forum at nginx.us
Thu Dec 29 12:41:39 UTC 2011


solved 
location
~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|txt|js|css|html|htm|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$
{
expires 7d;
try_files $uri @backend;
}
location ~.*\.(html|htm)$ {
add_header Pragma "no-cache";
try_files $uri @backend;
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,220621,220662#msg-220662



More information about the nginx mailing list