Redirect to sponsor based on geo or language

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LouiseLloyd
    SO FUCKING SCAMMED
    • Mar 2010
    • 1429

    #1

    Redirect to sponsor based on geo or language

    Trying to find a solution for this:

    Wanting to redirect URL base on vistors geo location or browser language:

    EG. Visitor clicks link: Geo location or browser language EN-GB = redirects to sponsor A, EN-US = to Sponsor B, IT = to sponsor C, ES = to sponsor D.

    Pretty much how geolocation redirect of a site works, but set individually per URL.

    I initially thought it would be quite simple using htaccess redirect for each URL but struggling.

    Any help, tips or point me in the direction of a guide.

  • Klen
    • Aug 2006
    • 32235

    #2
    Did you configured geo database ?

    Comment

    • zawali
      Confirmed User
      • Nov 2022
      • 405

      #3
      <script>

      switch(navigator.language) {
      case 'en-GB':
      redirectURL='url targeting UK people'
      break;
      case 'en-US':
      redirectURL='url targeting USA people'
      break;
      case 'en-AU':
      redirectURL='url targeting AUSTRALIA people'
      break;
      case 'fr-FR':
      redirectURL='url targeting FRANCE people'
      break;
      case 'es-ES':
      redirectURL='url targeting SPAIN people'
      break;
      case 'it':
      redirectURL='url targeting ITALY people'
      break;
      case 'de-DE':
      redirectURL='url targeting GERMANY people'
      break;
      case 'en-CA':
      redirectURL='url targeting english speaking canadian people'
      break;
      case 'fr-CA':
      redirectURL='url targeting french speaking canadian people'
      break;
      default:
      redirectURL='url targeting anyone in any area not set above'
      }

      </script>

      Comment

      Working...