Check that you have the [mod_geoip][1] module (**GeoIP Extension**) installed on your server.
Then, tweak your `.htaccess` file accordingly :
GeoIPEnable On
GeoIPDBFile /path/to/GeoIP.dat
# Start Redirecting countries
# France
RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^FR$
RewriteRule ^(.*)$ http://in.abcd.com$1 [L]
# etc etc etc...
----------
[Here ][3]is a list of all ISO3166 Codes<br>
And here's the [official documentation][2].
[1]: http://www.maxmind.com/app/mod_geoip
[2]: http://www.php.net/manual/en/book.geoip.php
[3]: http://www.geoplugin.com/iso3166
Check that you have the [mod_geoip][1] module (**GeoIP Extension**) installed on your server.
Then, tweak your `.htaccess` file accordingly :
GeoIPEnable On
GeoIPDBFile /path/to/GeoIP.dat
# Start Redirecting countries
# Canada
RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CA$
RewriteRule ^(.*)$ http://ca.abcd.com$1 [L]
# India
RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^IN$
RewriteRule ^(.*)$ http://in.abcd.com$1 [L]
# etc etc etc...
----------
And here's the [official documentation][2].
[1]: http://www.maxmind.com/app/mod_geoip
[2]: http://www.php.net/manual/en/book.geoip.php