-
- 5 Posts
Ok, here's what I found out:
I can create documents with ".html-less" urls if they are parented with a final child document. For example:
www.example.com/about can be achieved if it has a child like www.example.com/about/ralph.html
www.example.com/about/ralph can be achieved if it too has a child like www.example.com/about/ralph/slug.html
And so on...It seems like all document URL chains will require a redundant child document at the end of the line so to speak.
Even though this situation is like getting an 8-track tape player with a new Aston Martin, I really like MODx and admire the thought and engineering behind it, so I will try to run with this information unless I hear a better approach from an intrepid MODx expert.
[ed. note: ralphgoy last edited this post 8 years, 6 months ago.]
-
- 189 Posts
In the Content menu, select Content types. Add a new content type exactly the same as HTML (call it HTML blank) except leave the file extension blank. Or, if ALL html pages are to be without extension, edit the HTML entry directly. This should then give you the behavior you're looking for. If you do the former, you'll need to select the HTML blank content type for each document you want without extension. By editing the html content type directly, this will become the default.
-
- 189 Posts
Hmm. Certainly the second option has worked for me on a couple of different sites, but this is under Apache2. I would not expect that to make a difference, but you never know...
Also, you may have to manually delete core/cache/* for it to become effective - not sure but it can't hurt.
-
- 5 Posts
Tried both suggestions again without success.
But I think we might be ok for now with the dangling child page. This might actually serve a purpose.
Anyway, the next effort is to figure out how to do "smart routing".
Something like: example.com/story/{id:[a-zA-Z0-9]}