nginx rewrite of certain mime types and request processing order

Francis Daly francis at
Mon Nov 5 11:20:54 UTC 2012

On Mon, Nov 05, 2012 at 06:00:32AM -0500, technoplague wrote:

Hi there,

> The problem is with processing order and /get location rewrite. 
> The request: returns 404,
> instead by getting processed by /get location rewrite rule. This is because
> swf is defined in (static content) location:
>     # static content
>     location ~* \.(jpg|jpeg|gif|css|png|js|swf|ico|rar|zip)$ {
>         expires max;
>         access_log off;
>         log_not_found off;
>     }
> How is it possible to have /get location rewrite working together without
> removing swf type from static content location?

Note particularly the various things in between "location" and "uri",
and the example configurations D and E.

Francis Daly        francis at

More information about the nginx mailing list