We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 925
    • 8 Posts
    Hi All

    Is it possible with ModX to filter words depending on which domain a user comes from?

    For example, if I had a site called "mountainbikes.com" in which all reference to the site name was "mountainbikes", is it possible to display "mountain bikes" (notice the space!!) if a user clicks on "mountainbikes.biz". The .biz domain is simply forwarded to the ".com"

    I have looked at the Word Filter plugin and see how the filtering process will work - but am unsure if i can make ModX distinguish between the ".com" and the ".biz"

    Would very much appreciate some insight.

    Many thanks.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I would experiment with echoing various $_SERVER values to see what you get. You should be able to get the original server that was called for (the .biz one), then filter for that (if($_SERVER[’whatever’] == blah.biz) { do whatever; }

      Might be _SERVER["HTTP_REFERER"]
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org