How can I write a location block that matches any path ending in the following extensions:
jpg|jpeg|gif|css|png|js|ico|json|xml|txt|html
Unless the path starts with "/rails" (eg: /rails/randomstring/image.png)?
I currently have this basic block:
location ~* \.(jpg|jpeg|gif|css|png|js|ico|json|xml|txt|html)$ { gzip_static on; gzip on; expires max; add_header Cache-Control public; } But this would match "/rails/randomstring/image.png" and I don't want that.


