Redirect a user based in country and querystring value

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


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?


Posted at Nginx Forum:,187241,187241#msg-187241

More information about the nginx mailing list