1

I have the following rule in my nginx config:

location ~* .(js|css|png|jpg|jpeg|gif|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ {

which matches some images and other resources. However I want to prevent it to match resources which are in a specific directory uploads. How would I change the above rule to prevent matching files in the uploads directory (like /uploads/something.jpg), but still match file like /anything/whatever.jpg or just whatever.jpg?

1 Answer 1

5

location ~* ^\/(?!(upload\/)).*(js|css|png|blahblah)$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .