About location

Can i use this sentence in location ?

        if ($request_uri ~* "^/(list|small|big)_.*") {
            expires      1m;
        }

On Fri, Apr 16, 2010 at 11:05:59AM +0800, 李睿 wrote:

Can i use this sentence in location ?

        if ($request_uri ~* "^/(list|small|big)_.*") {
            expires      1m;
        }

You should use just location:

   location ~* "^/(list|small|big)_.*") {
        expires      1m;
   }

or better several static prefix locations:

   location /list_ {
        expires      1m;
   }

   location /small_ {
        expires      1m;
   }

   location /big_ {
        expires      1m;
   }


Igor S.
http://sysoev.ru/en/

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