We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47570
    • 3 Posts
    Weird situation - existing website (been live for 1.5 years). Any new link published on the site just goes to the homepage.

    For example, I published an article on the blog that should be company.com/test1 in the link - but the link just goes to company.com

    I'm not sure if this is a permissions issue or something further
      • 3749
      • 24,544 Posts
      Make sure you're creating the internal links with link tags. This would be a link to the page with the ID 12, for example:

      <a href="[[~12]]">Page Twelve</a>


      Also, make sure that you have this in the head section of all templates:
      <base href="[[++site_url]]" />


      Another possibility is that the host has modified your .htaccess file.
        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
        • 47570
        • 3 Posts
        Thanks Bob - But with the blog posts, I'm not actually creating the links on the blog page, they are being generated by the system - but for some reason the new ones aren't linking to the post page - just the homepage.
          • 3749
          • 24,544 Posts
          Have you changed anything lately?

          Are the blog posts being linked to published?
            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
            • 46458
            • 3 Posts
            Bob -

            I am also working on this site with Nick. Nothing has really changed. It is very strange, this is happening with blog posts and with any new resources/pages that are created as well. The automated link creation is generating links that point to the base url rather than the new page url which is set in the alias field of that particular resource.

            I will take a look at the htaccess file just to be sure there is nothing in there causing any issue.

            Thanks for your assistance.

            - Chad
              Chad
              @lingokid
              • 3749
              • 24,544 Posts
              Try selecting a page, clicking on Freeze Uri. See what's in the revealed input but don't change it. Save the page, clear the cache and see if links to that page work.

              If that works, try turning Friendly URLs off in System Settings clear the cache, then turn them back on and clear the cache again.

                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