Currently, when I type "mydomain.com/resource/something/24" into the address bar, modx loads resource id 1. I don't want that behavior.
I would rather modx load "resource" so I can parse the URI and display data dynamically from the database like friendly URLs should.
In other words, how can I tell modx to load the last URI that matches an alias and not default to resource 1 if it can't find a child resource of that resource with the very last name in the URI.
I feel like this is probably a confusing post so I will provide an extensive example of how I want to have modx setup with friendly URLs.
Example of the behavior I wish for...
I have a resource with the alias "apples". This resource will either show a page of all different kinds of apples that you can click to (mydomain.com/apples), or, it will show only a specific type of apple based on the URI (mydomain.com/apples/red-delicious), dynamically, without having to create a child resource for each apple type.
The reason I need this functionality is because I am writing a custom snippet that dynamically pulls entries from the database. I do not want to put "?something=something-else" in the address bar for SEO and it's much easier for a reader to remember that they were on "mydomain.com/apples/red-delicious" than "mydomain.com/apples?type=9", plus, I'm working with several thousand different kinds of "apples". Creating a resource for each "apple" is not an option at all.
I have search everywhere for friendly url tutorials that explain how to set this up with .htaccess, but that's not the best way to handle it. I thought I came across a post similar to this that had a great solution but I can't for the life of me find it anywhere. I'll keep searching. In the meanwhile if anyone out there can advise me I would be greatly appreciative.
[ed. note: aaronkent last edited this post 11 years, 2 months ago.]