We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18973
    • 61 Posts
    I’d really like to use alias paths, but it appears that it’s not quite ready. If I visit a page that takes me to mydomain.com/folder123/page.html then attempt to click a link that should take me to mydomain.com/contact.html modx tries to take me to mydomain.com/folder123/contact.html. Has anyone else come across this?
    Did some searches but didn’t find too much. Any fixes or is this on the backburner?

    Thanks.
      • 32241
      • 1,495 Posts
      I thought it suppose to be that way?
      Isn’t it?

      Even when you use static html, it will always link all the relative link address according to the current directory they are in right now.

      Correct me if I’m wrong.
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 18973
        • 61 Posts
        I guess I thought the point of using the [ ~ id ~ ] links was to keep it directing to the correct page no matter where it was located.
        But, then again, I see your point. I’ll work with what is currently in place. Thanks for the response.
          • 33337
          • 3,975 Posts
          here is a quick fix;

          add this line to <head> area of your template:
          <base href="[(site_url)][(base_url)]" />
          


          OR

          <base href="[(site_url)]" />
          


          (sorry, i dont recall what it was exactly, but 1 of 2 will work)

          We’ll look into it, it should be addressed, but AFAIK alias paths cause problems on some servers.

          regards,

          zi
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
          • Alias paths is actually fixed to the point that it should work reliably for the first time with 0.9.1. If you still run into issues, try
            <base href="[(base_url)]" />
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 32241
              • 1,495 Posts
              Quote from: mealex at Dec 29, 2005, 05:33 AM

              I guess I thought the point of using the [ ~ id ~ ] links was to keep it directing to the correct page no matter where it was located.
              But, then again, I see your point. I’ll work with what is currently in place. Thanks for the response.

              I see your point too, well, you can try the base url, and it is not working please report it back to this forum, because I’m in the need of it right now.

              Thanks
                Wendy Novianto
                [font=Verdana]PT DJAMOER Technology Media
                [font=Verdana]Xituz Media
                • 18973
                • 61 Posts
                <base href="[(base_url)]" />
                This resolves the issue with links. Although, I just noticed all images in my template aren’t available when viewing a page using Alias Paths.
                • The correct one is <base href="[(site_url)]" />. If you have a CSS or other external images or script files with paths relative to the root of the site, changing your base tag href attribute to the [(site_url)] value should address these as well.
                    • 32241
                    • 1,495 Posts
                    Just so you guys know, the site_url will return the complete domain with "http://", as in base_url, it will only append "/" and followed by relative path I belief.

                    Correct me again if I’m wrong about this explanation.
                      Wendy Novianto
                      [font=Verdana]PT DJAMOER Technology Media
                      [font=Verdana]Xituz Media
                      • 18973
                      • 61 Posts
                      Quote from: OpenGeek at Dec 29, 2005, 04:22 PM

                      The correct one is <base href="[(site_url)]" />. If you have a CSS or other external images or script files with paths relative to the root of the site, changing your base tag href attribute to the [(site_url)] value should address these as well.

                      Beautiful!!! Everything is working perfectly.
                      Dang, now I’m forced to donate. wink