location filter

Francis Daly francis at daoine.org
Fri Oct 3 09:04:02 UTC 2014

On Fri, Oct 03, 2014 at 04:32:06AM -0400, rapamiti wrote:

Hi there,

> i use actually :
> location ~*
> ^.+.(jpg|jpeg|gif|png|bmp|ico|pdf|flv|swf|exe|txt|css|js|xml|woff|eot|ttf|svg)$
> {
> and all is ok
> but i want to remove from nginx a dynamic image, ex : logo_125_21.gif who is
> generated by apache/php (with rewrite)
> numbers are randoms.

If I've understood you correctly:

See http://nginx.org/r/location and possibly

and add a separate location that does match your urls -- something like
~logo.*gif$ -- that will apply before your current location.

Francis Daly        francis at daoine.org

More information about the nginx mailing list