We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8511
    • 1 Posts
    Hi,
    I would like to redirect the visitors of my site to a site in their local language. Is there a way to redirect a user to a specific url based on their IP? Is there a standard plug-in for modx that does this? Has anyone implemented this with for instance the ipinfodb.com database?

      • 2528
      • 8 Posts
      I'm resurrecting this, as I would like to see how it is done too. I have a site with Babel installed and two contexts - Web & US. I am trying to have the global site as the default and any visitors with a USA IP get redirected to websitename.com/us

      Any hints on where I can put an ip-sniffing code would be great.
        • 18373 ☆ A M B ☆
        • 3,141 Posts
        I'd probably throw it in a plugin, hooked to the OnHandleRequest plugin event; that's one of the earliest events to hook into.
          Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

          Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
          • 2528
          • 8 Posts
          That's why I love Modx. YOu can make it do what you want. PLUS it has a dedicated, and knowledgeable following.

          Thanks guys!