More than one conditon in an IF statement?

Ian Neubert lists at ruby-forum.com
Sat Feb 2 00:12:26 MSK 2008


Hello All,

I can't seem to figure out how to put more than on condition in an IF
statement. Is this possible?

I thought this would work:
if ($request_uri ~* \.(jpg|jpeg|gif|png|css)$) {
  expires 1d;
}
if ($is_args) {
  expires max;
  break;
}

But it sets all URI's with a query string to expire max, instead of just
those ending in (jpg|jpeg|gif|png|css).

Any ideas? Thanks in advance for your help.
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list