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
-
☆ 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".
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/.
-
☆ 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
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.
-
☆ A M B ☆
- 24,524 Posts
No, the .htaccess will have no effect on how MODx generates the URLs with such a structure.
-
☆ 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 :~}
Okay. So what I'm asking can't really be done then?
-
☆ 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.
-
☆ 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.