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

    I’ve installed MODx 0.9.6.2 to run a web site on a free web hosting service. I recently purchased a domain name and have pointed it to my web site (my web hosting service allows me to do that), so I can now appear to be www.mysite.net instead of being subdomained as mysite.freewebhost.com.

    (Assuming I understand correctly what I need to do) I want to change the base_url in my MODx installed so that the generated URLs (for example, in the navigation menu) say, for example, www.mysite.net/index.php?id=1 instead of mysite.freewebhost.com/index.php?id=1
    How can I do that? (Or if I’ve completely misunderstood what I need to do, then how do I accomplish what I want?)

    I thought these settings were stored in the config.inc.php file in manager/include, however that file appears to be empty when I checked it out.

    Would appreciate any help... thanks!
      • 25663 MODX Staff
      • 12,272 Posts
      That file should most definitely not be empty after you install.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 20028
        • 3 Posts
        Thanks for the reply. Sorry, my mistake, the config.inc.php file is not empty... it was something to do with file permissions, I think; I was trying to download the file from the web server to my local machine which I wasn’t actually able to do, but an empty text file with the same name was being created (or something like that).

        Anyway, that’s resolved now; I now have the config.inc.php file available for editing. How do I solve my original problem? (I can see from the config file the $base_url being generated via server variables, but I’d rather if possible get a quick answer rather than have to go through the code and figure it out).

        Also, should the permissions on the config.inc.php be 644?

        Thanks!

          • 36592
          • 970 Posts
          First of all, you should clear MODx cache.
            • 20028
            • 3 Posts
            Thank you very much... that solved it!
            Just to make sure I understand this correctly: was the problem due to document caching?
            Just curious, but if the snippet call to Wayfinder (which generates the navigational menu) had been uncached, would it also have prevented this from happening?
            Once again, I appreciate the help!