location into location doen't work as expected

Daniele Melosi ml at melosi.it
Tue Apr 7 19:04:40 MSD 2009


Hi all,

I've the following location configuration that doesn't work as expected 
(i symplified my configuration with return value instead of rewrite):

location ^~ /image/ {
   location ^~ /image/(halfcol|medium|thumb)/ {
      return 402;
    }
    location ^~ /image/ {
      return 403;
    }
}

if i tried to get a /image/halfcol/something i expected to received a 
402 return code.

$ HEAD http://localhost/image/halfcol/pippo.jpg | head -n1
403 Forbidden

I got a 403 instead :(

Thanks in advance
Daniele






More information about the nginx mailing list