We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42141
    • 73 Posts
    Hi,

    Is the following structure possibile in Modx?

    mydomain.com/page1.php
    mydomain.com/page1/childpage.php

    • That is the default structure for MODX actually, except the default for the parent is mydomain.com/page1/ and mydomain.com/page1/childPage.html when FURL's are enabled. Use your resource tree to create this structure (place children under a parent resource - just drag and drop, set the parent manually from the resource drop down, or right click a parent resource and create). In system settings, set the file extension to php instead of html if you wish to use the php file extension.

        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 42562
        • 1,145 Posts
        To be more precise, make sure Use Friendly Alias Path is also set to yes. Or else all your ordinary resources would ignore their parents:
        mydomain.com/childpage.php
          TinymceWrapper: Complete back/frontend content solution.
          Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
          5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
          • 42141
          • 73 Posts
          Quote from: frogabog at Feb 08, 2013, 05:23 PM
          That is the default structure for MODX actually, except the default for the parent is mydomain.com/page1/ and mydomain.com/page1/childPage.html when FURL's are enabled. Use your resource tree to create this structure (place children under a parent resource - just drag and drop, set the parent manually from the resource drop down, or right click a parent resource and create). In system settings, set the file extension to php instead of html if you wish to use the php file extension.

          This was exactly how it worked on my test install indeed:
          mydomain.com/page1
          mydomain.com/page1/childpage.php

          However, after fresh install (and copying templates and pages over) on the live site, I do have this however:
          mydomain.com/page1.php
          mydomain.com/page1/childpage.php

          Don't get me wrong, I am very happy with that. But since it is not the correct behaviour of Modx, I am wondering what has happened to behave it this way though. I didn't do anything to the htacces file (except renaming so that Apache recognizes it and uses it, as usual), nor did I fiddle around with other technical options. Nevertheless I wanted to report it, since it is not how Modx uses friendly URL's.
          • There is a system setting for container_suffix.
              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
              • 42141
              • 73 Posts
              But the thing is: I didn't do anything differently with my test install than I did with my live install. So that this suddenly happened surprised me. That's why I don't understand the difference in the friendly URL's between the two installs.