Hello,
I want to redirect people to specific pages on a website according to their country but i dont want to redirect googlebot or other spiders, how can i do this with nginx ?
I have done redirection with php earlier but havent been able to exclude googlebot.
As i read from maxmind website, on apache its done like this
[code]
GeoIPEnable On
GeoIPDBFile /path/to/GeoIP.dat
# Redirect one country
RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CA$
RewriteRule ^(.*)$ http://www.canada.com$1 [L]
# Redirect multiple countries to a single page
RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(CA|US|MX)$
RewriteRule ^(.*)$ http://www.northamerica.com$1 [L]
[/code]
It still does not have any info to remove googlebot from redirection.
Thanks for any help.
http://www.somerorbay.com