The best way might be to check locale in accept-language HTTP header. If the primary locale is de then send to german site else to your main site. This way you will redirect all visitors whose primary language is german (for example austrian, some swiss etc), not just those who are currently on de IPs. If you need exactly those who are currently on german IPs, then, as it was said above, mod_geoip2 for Apache or ngx_http_geoip_module for nginx.
|