Geoip redirect but exclude a specific directory

st1905 nginx-forum at nginx.us
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)
        {
                                       break;
                                                }

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: http://forum.nginx.org/read.php?2,152469,152931#msg-152931




More information about the nginx mailing list