We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14281
    • 120 Posts
    Before I upgraded to 0.9.5, I could access pages two ways through friendly URLs:

    1. http://site.com/category/subcategory/page.html - this reflected the tree structure, or

    2. http://site.com/123.html - this just reflects the page id

    I was using the second option as the permalink, which made more sense to me (see my argument).

    With the new beta, this functionality has ceased. If I try to access a page through the second option, it just takes me to the home page, which is my default action when an error occurs.

    Any way to fix this?
      • 25663 MODX Staff
      • 12,272 Posts
      Which beta revision are you talking about? FURLs should still work, and their path-based alternatives. Is number 1 or number 2 or both failing?

      There are changes to the core which address Friendly Alias paths and going to a non-existant location. The result would be an unstyled page. This no longer occurs, and may be part of the reason. You’d like need to enter 123 as your alias, which should also be possible. Otherwise permalinks should be written in the query-string syntax without the FURL rewrites: index.php?id=15
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 14281
        • 120 Posts
        option 1 is still working fine. It’s 2 that no longer works.

        I’m using rev 1417.

        Using http://site.com/index.php?id=123 works fine too. It’s using the ID in a friendly URL, like http://site.com/123.html, that no longer works. This worked great in the prior release, but it doesn’t work any longer.
          • 22303 MODX Staff
          • 10,725 Posts
          This change in behavior is by design to avoid duplicate content issues with search engine indexing.
            • 22815
            • 1,097 Posts
            I believe with 0.9.5 as it stands it is possible to do either, but not both.

            I can see the logic behind your preferred permalink, but I really really really don’t understand why you’d want to refer to a page by a second URL. (I can see why you’d want to reference featured content by a permalink, like in webcomics - latest one is on home page, but there’s a permalink for when the cartoon moves to the archive.. ideally in that case 123.html already exists, all that is happening is that the home page is repeating the content).

            I just don’t get why you would want to have
            http://tiltedsymmetry.com/Articles/Blogging/What-are-PermaLinks.html
            AND
            http://tiltedsymmetry.com/103.html

            as the PageRank implications are bad.

            I know that some changes were made [edit: as OpenGeek says] to stop multiple pages being available; I don’t know whether that’s toggle-able, but in principle it should be hackable out or (as I’ll come to in a minute) coded around in a flexible way.

            Personally, I just treat aliases as set in stone; I don’t include category level stuff in the alias because that’s all highly likely to change as you say.

            At some point I’m going to look at some smarts for the 404, so that page names that are not recognised by MODx could run through a custom routine to find the most likely page that is meant and redirect accordingly (eg "Articles/Blogging/What-are-PermaLinks.html" might find "BestPracticeBlogging/What-are-PermaLinks.html"). Such a routine could also twig that a numeric page name probably refers to a document ID and redirect to the right page.
              No, I don't know what OpenGeek's saying half the time either.
              MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
              Forum: Where to post threads about add-ons | Forum Rules
              Like MODx? donate (and/or share your resources)
              Like me? See my Amazon wishlist
              MODx "Most Promising CMS" - so appropriate!
              • 14281
              • 120 Posts
              Quote from: PaulGregory at Oct 06, 2006, 12:23 PM

              At some point I’m going to look at some smarts for the 404, so that page names that are not recognised by MODx could run through a custom routine to find the most likely page that is meant and redirect accordingly (eg "Articles/Blogging/What-are-PermaLinks.html" might find "BestPracticeBlogging/What-are-PermaLinks.html"). Such a routine could also twig that a numeric page name probably refers to a document ID and redirect to the right page.

              This would be an interesting approach.

              Also, could you elaborate on what you mean by "PageRank implications are bad"?
                • 22815
                • 1,097 Posts
                Google’s PageRank is per-page; thus the people linking to and visiting
                http://tiltedsymmetry.com/Articles/Blogging/What-are-PermaLinks.html
                and
                http://tiltedsymmetry.com/103.html
                would be counted separately if they both worked as pages - meaning that they would both have lower PageRanks than if they were together, and thus you’d have a lower position in search results.

                There’s also some concern about content duplication, in which Google would penalise one or both pages for being identical to another page.

                Of course, http://tiltedsymmetry.com/Articles/Blogging/What-are-PermaLinks.html will do better in search results than 103.html because it has words in the URL. So the one that people are more likely to visit is the one that isn’t the permalink!
                  No, I don't know what OpenGeek's saying half the time either.
                  MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                  Forum: Where to post threads about add-ons | Forum Rules
                  Like MODx? donate (and/or share your resources)
                  Like me? See my Amazon wishlist
                  MODx "Most Promising CMS" - so appropriate!
                  • 14281
                  • 120 Posts
                  Excellent points. Thanks.
                    • 25317
                    • 122 Posts
                    Quote from: jlivingston at Oct 06, 2006, 10:13 AM

                    1. http://site.com/category/subcategory/page.html - this reflected the tree structure, or

                    2. http://site.com/123.html - this just reflects the page id

                    I’ve installed a clean version of 0.9.5, and using FURLs with alias paths. This all works really well, untill I want to reference another page using the page id.

                    For example... <a href="[~32~]" >Link text</a>

                    Where 32 is the ID of the page I want to link to. IT duplicates the previous two levels of folders in the URL therefore making the link invalid.

                    I originally found this with one of the older snippets I use called ’GetLink’ by ceaza. Thinking it might be a legacy issue, I tried the example above, but with the same problem.

                    FURL paths work fine apart from the ID links. Any ideas?





                      • 22303 MODX Staff
                      • 10,725 Posts
                      ...
                      <head>
                      <base href="[(site_url)]"></base>
                      ...