We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47401
    • 295 Posts
    just wondering if anybody else had the same issue. some of the links on my website are absolute path which work fine, and those links that are relative paths seem to be redirecting to the homepage as though it cant find the file. im not too sure if its a modx setting or a setting in the .htaccess file that needs to be added/changed. any advice would be greatfully appreciated.

    relative code is say for example [[~5]] which would give i.e contact-us.html

    absolute would be [[++site_url]][[~5]] which would give http://domain.com/contact-us.html

    could it be a setting in the context?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Do you have the base meta tag in the template head?
      <base href="[[++site_url]]">


      And actually, that's a full URL. Absolute is just to the web root (base_url), like /contact-us.html
        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
        • 47401
        • 295 Posts
        hi

        yes I do have the base href included in the header of the website
          • 49693
          • 8 Posts
          Any update on this issue as I am experiencing the same problem.
            • 3749
            • 24,544 Posts
            Do you have multiple front-end contexts?

            FYI, the default value for the error_page (page-not-found) System Setting is the home page of the site (i.e., the same as the site_start System Setting).

            Anytime a page isn't found, you'll end up there. It's not because you're going there directly there based on the URL. It's because no page was found with the URL so MODX is forwarding you to the page-not-found page.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting