deny by ip and redirect

Ilan Berkner iberkner at
Sun Oct 17 18:36:42 MSD 2010

hi all,

I'd like to only allow a certain set of ip addresses to access one of our
test sites, and redirect anyone with a different ip address to our primary

location / {
  deny all;

The above code works as expected, but I would like to do something like

location / {
  if not or or do a 301 redirect to request uri)

is this possible?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list