We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36502 ☆ A M B ☆
    • 491 Posts
    Hi,
    I've worked on a server, the site has been published on the same server, I just changed DNS setting of my hosting and, in the config.inc.php file, I changed the $http_host parameter (all the other values are the same).

    I cleaned my cache and everything went ok,
    but, after some minutes the site (Wayfinder most of all) took the old url as reference...
    so instead of:

    www.mysite.com/index.php?id=10

    I have http://testingsite.mysite.com/index.php?id=10

    exactly, if I look at the source of the page: http://testingsite.mysite.com:80/index.php?id=10

    If I clean the cache everything goes fine again, but after some minutes the same problem appears again...
    Is there another place where I can set the site_url?...
    Is it a hosting setting?
    thanks in advance
    [ed. note: tillilab last edited this post 14 years, 11 months ago.]
      TilliLab | MODX Ambassador
      website
      • 22303 MODX Staff
      • 10,725 Posts
      While DNS changes propagate across the net various clients might still be requesting the site via the the testing hostname, which I assume is on the same IP address and most likely being handled by the same virtual host configuration on your server.

      You can set the site_url tag non-cacheable in your templates to prevent this in most cases:
      <base href="[[!++site_url]]">
        • 36502 ☆ A M B ☆
        • 491 Posts
        Thanks for your answer,

        I did it, and actually it works for files reference (css, js etc.)

        But how can I manage to make also wayfinder takes the correct path?
        I tried calling it uncacheable, but it didnt't work...
          TilliLab | MODX Ambassador
          website
          • 22303 MODX Staff
          • 10,725 Posts
          Make sure you have disabled cacheResults on Wayfinder first of all.
            • 36502 ☆ A M B ☆
            • 491 Posts
            &cacheResults=`0`


            solved my problem,
            thanks!
              TilliLab | MODX Ambassador
              website