Hey everyone, I would like to redirect every visitor to my website coming from a specific state, to another website. For example, if anyone visits my domain from the state of New York, and I want to redirect all New York visitors, they would all go directly to the other site and never see my site. Does anyone know how I can do this? Thank you so much! - Jennifer
Have a look at the city products from MaxMind, http://www.maxmind.com/app/ip-location you can then detect and redirect visitors.
This can be done through Global Server Load Balancing (GSLB). GSLB is a technique that manages how clients connect to a datacenter when a service is hosted in multiple datacenters. A significant purpose of GSLB is to improve Customer Experience online; to load-balance each user to the best datacenter from a choice of several datacenters. The choice can be based on datacenter performance and proximity, so that clients are directed to the datacenter that is closest and is performing the best. This way, the client gets the best possible level of service.
If you do go the route of using a geo-IP database such as MaxMind, just know that these databases can be wrong.
The database is %90 correct, you can get the city database http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz and use a webserver or a coding in php to redirect people from cities to specific places.
You will add this to your .htaccess or in to httpd.conf under the site vhost config. Here´s an example to redirect by country: # Redirect multiple countries to a single page RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(CN|KR|BR)$ RewriteRule . city.html [L] Presumably you just replace that ENV to match the city. Check out Maxmind´s documentation for that.