I need to configure nginx server. I have folder with css files there are files some_file.min.css but in html website ask for some_file.css. I need to redirect this request to *min.css and if minified file doesnt exist return normal .css file
location ~* \.(css)$ {
root /usr/share/nginx/html;
try_files $1.min.$2 $uri =404;
expires 30d;
}
This piece of code does not work.