Geoip redirect but exclude a specific directory

st1905 nginx-forum at
Wed Nov 24 15:49:10 MSK 2010

I solved this by adding following rewrite rule just above the if
statements for the geoip redirection

if ($request_uri ~* ^/admin)

That solved the issue, now when someone from germany goes to site root
they will still be redirected but if they go to admin section of the
site, it wont redirect, thanks a lot Rainer and Maxim.

Posted at Nginx Forum:,152469,152931#msg-152931

More information about the nginx mailing list