We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40735
    • 119 Posts
    Hi!
    I have my site structured so that the web root contains a container resource called Home. Consequently, my FURLs all look like domain.com/home/pageone, domain.com/home/pagetwo, etc. but I would like them to simply be domain.com/pageone, etc. Can this be done?
    Thanks!
    Dave
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      In the system settings, go to the "Friendly URL" area in the Filter by area select, then scroll down to the Use Friendly Alias Path setting and change it to "No".
        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
        • 40735
        • 119 Posts
        I'm sorry, I should have been more clear. I do want it to show the path, I just don't want the path to start with /home/.
          • 10208 ☆ A M B ☆
          • 1,780 Posts
          That's the subdirectory that your MODX is installed on. You'll need to use .htaccess rules to redirect the url's to not show the subdirectory.

          There's information in the thread below, and further links to a few other threads that have the .htaccess settings you need.

          https://forums.modx.com/thread/?thread=73954#dis-post-410673
            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
            • 40735
            • 119 Posts
            Thanks but, no, MODx is installed in the web root. Within MODx I have created a container resource called Home. All my pages are inside this container, I just don't want the paths in the URL to reflect that. I do expect that this will require some mod_rewrite trickery but I wanted to make sure there wasn't an easy way to change this in MODx before I start monkeying with .htaccess especially since I'm not sure that rewriting an already rewritten URL will work like I want it to.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              No, the .htaccess will have no effect on how MODx generates the URLs with such a structure.
                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
                • 10208 ☆ A M B ☆
                • 1,780 Posts
                Oh, sorry. I misinterpreted the part about the container resource and web root. Best of luck with this...? I'll be staying tuned :~}
                  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
                  • 40735
                  • 119 Posts
                  Okay. So what I'm asking can't really be done then?
                    • 10208 ☆ A M B ☆
                    • 1,780 Posts
                    Not that I know of (admittedly, my knowledge is limited however).

                    The way you've structured it is one level deeper than normal, and the container resource is acting as a parent directory/resource for the entire site.

                    Is there a reason you've structured it this way? Usually the web context is sufficient for housing all your pages, acting as a container resource in a way. Setting the site_start to the Home resource ID will direct users to that page first even if it's not the main container resource for the other pages.
                      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
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      If you have resources in the container with the alias "home", and have the alias paths setting on, then that's what is supposed to happen. I don't think you can have it working for some containers and not others.
                        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