We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13736
    • 345 Posts
    I’m not sure if this is a bug or configuration problem.

    The Test Site
    http://modx.acgi.org/

    When I set up my test site to use the Friendly URLs I seem to have a problem where sometimes the link will work fine. And sometimes it will send me back to the home page with a large weird address in the address bar.

    For example, from the home page, clicking on "My Account > Newsletter Subscriptions" will usualy bring up...
    http://modx.acgi.org/home/myaccount/subscriptions.html


    Then from there clicking on "About Us" should bring up the address:
    http://modx.acgi.org/home/About-Us.html


    but quite often bring up this:
    http://modx.acgi.org/home.html?refurl=%2Findex.php%3Fq%3Dhome%2Fmyaccount%2Fhome%2FAbout-Us.html&err=1

    which shows the home page info.

    This seems to happen on many different pages, but not always every time. If you click on "About Us" again it will usually go to the correct page. Has anyone seen this before? Is it a configureation problem or a bug in the Friendly URL system?

    This seems to happen in both Firefox and IE.
      • 31337
      • 258 Posts
      The "long URL" simply means that the system couldn’t find a page with that alias and redirected you. Not sure why it sometimes works and sometimes doesn’t.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        If you mouseover the links, you can see the URL that the browser has generated is just adding the page alias to the existing path, which is not at all what you want.

        You can go to

        http://modx.acgi.org/home/myaccount/subscriptions.html

        just fine, but then to go back home, or to any other link from there, you get

        http://modx.acgi.org/home/myaccount/home.html

        when you should be getting

        http://modx.acgi.org/home.html

        The actual link, in View Source, is relative:

        a href="home.html"

        I don’t know enough about the alias path option to say much, but this bit makes me a little suspicious:

        NOTE: When setting this option to ’Yes’ (turning on alias paths), you must reference things (such as images, css, javascripts, etc) using the absolute path: e.g., ’/assets/images’ as oppose to ’assets/images’. By doing so you will prevent the browser (or web server) from appending the relative path to the alias path.

          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
          • 13736
          • 345 Posts
          So is that a bug or what?

          I would like the virtual folders to show in the URL and turning that option to yes is what seems to enable the folder strings. I wondered if there is a setting somewhere that tells MODx what the URL of the site is supposed to be. And without that info it’s making everything relative from where ever it is rather than from the root.

          Or some such type thingy.

            • 22303 MODX Staff
            • 10,725 Posts
            Quote from: jbjones at Mar 18, 2006, 11:41 PM

            So is that a bug or what?

            I would like the virtual folders to show in the URL and turning that option to yes is what seems to enable the folder strings. I wondered if there is a setting somewhere that tells MODx what the URL of the site is supposed to be. And without that info it’s making everything relative from where ever it is rather than from the root.

            Or some such type thingy.

            Please see the 0.9.1 known issues thread at http://modxcms.com/forums/index.php/topic,1942.msg22795.html#msg22795
              • 13736
              • 345 Posts
              Adding the tag...

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


              to the top of the header was the solution for this problem. Thank you for the help.