Redirect a user based in country and querystring value

nfn nginx-forum at nginx.us
Fri Apr 1 02:06:39 MSD 2011


Hello,

I'm looking for a way to redirect users from some countries and with a
querystring value to a specific page.

I tried this without success:

 location /register.php {
  if (($geoip_country_code = (BR|PT)) and ($arg_action = "register")) {
    rewrite ^(.*) /page/info/registo.html permanent;
  }
}

How can I accomplish this?

Thanks

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,187241,187241#msg-187241




More information about the nginx mailing list