More than one conditon in an IF statement?

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.

On 2/1/08, Ian N. [email protected] wrote:

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.

you could either adjust your if statement logic, or set a variable in
the first if, and test for it later.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs