Best way to do geo redirection?
I would use Smart IP module. 


  Smart IP identify visitor's geographical location (longitude/latitude), country, region, city and postal code based on the IP address of the user. These information will be stored in session variable ($_SESSION) with array key 'smart_ip', Drupal $user->data object with array key 'geoip_location' in Drupal 6 and 7 and user data service using the parameters 'smart_ip' as module and 'geoip_location' as name in Drupal 8 of the user but optionally it can be disabled (by role) at Smart IP settings page. Other modules can use the function smart_ip_get_location($ip_address) in Drupal 6 and 7 and \Drupal\smart_ip\SmartIp::query($ipAddress) in Drupal 8 that returns an array containing the visitor's ISO 3166 2-character country code, longitude, latitude, region (FIPS), city and postal code. It provides a feature for you to perform your own IP lookup and admin spoofing of an arbitrary IP for testing purposes.


You can get the user location in different ways using this module. 

&lt;?php
$smart_ip_session = smart_ip_session_get('smart_ip');
if ($smart_ip_session['location']['country_code'] == 'PH') {
  drupal_set_message(t('You are in the Philippines.'), 'status');
}
?&gt;


Or

&lt;?php
if ($_SESSION['smart_ip']['location']['country_code'] == 'PH') {
  drupal_set_message(t('You are in the Philippines.'), 'status');
}
?&gt;


Now, in the Theme_preprocess_html function of your theme in the template.php file, use the above codes to check if the user is in a right place. Create template.php file in your theme and use this function:

function themeName_preprocess_html(&amp;$variables){
{
      $code = $_SESSION['smart_ip']['location']['country_code'];
      $currentLocation = arg(1); //it returns the /de or any language
      if(strtolower($code) != strtolower($currentLocation))
           drupal_goto("www.example.com/".strtolower($code));

}


If the default provides the language code, it works well but if not, you need to handle that case. For example if the default language is English and the /en is not coming after example.com, then you need to check if arg(1) == 'en'. It is easy to do.



update

To get the user language use this code

global $language;
print $language-&gt;language;


So your code will be

function themeName_preprocess_html(&amp;$variables){
{
      global $language;
      $code = $_SESSION['smart_ip']['location']['country_code'];
      $currentLocation = $language-&gt;language;; 
      if(strtolower($code) != strtolower($currentLocation))
           drupal_goto("www.example.com/".strtolower($code));

}