Setting expires header to multiple locations

howard chen howachen at gmail.com
Fri Dec 14 14:38:16 UTC 2012


Hi

On Fri, Dec 14, 2012 at 7:59 PM, Antonio P.P. Almeida <appa at perusio.net>wrote:

>
> Going against Igor, Maxim, Valentin and Ruslan in order to be more DRY you
> could use a regex based location (which has its own quirks):
>
> location ~* ^/(?:a|b|c)/.*\.(?:css|gif|js|jpe?g|png)$ {
>     expires 1y;
> }
>


Thanks.

My example just in a simplified form and there are more config inside each
a, b, c...So I must need separate blocks for them..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20121214/03163d01/attachment.html>


More information about the nginx mailing list