How do I structure modx pages so they aren't all at the root URL, whilst being organised in a folder in the manager?

StackOverflow https://stackoverflow.com/questions/17614208

Pregunta

I'm developing my site in modx, and have some custom error pages that I want to group in a folder called "error", and I want them to only be accessible through domain.com/error/page.html. I've already placed the custom error pages in a container called error, which basically looks like the image below.

Modx Folders

Only the pages are still only accessible from the root (so from domain.com/page.html), even though they are now in the "error" container. How do I change it so that when people see my error pages, they'll see the url: "domain.com/error/page.html"? Does anyone know how to do this?


p.s.: I've already figured out that I can influence the url of a page by typing the desired url in its "alias"-field. So an alias of "error/page" would mean it can be found at "domain.com/error/page.html".

But the weird thing is that this no longer works when I put the pages in an "error" folder. When I do that I can access the folder itself through domain.com/error, but no longer the pages in the folder at domain.com/error/page.html

¿Fue útil?

Solución

Look in your system settings for the error page & access denied page, just set those to the IDs of the custom pages you have created. If you want custom pages for other error codes, you may have to use some redirect rules in an htaccess or apache config file. Some of them will probably never work [like 500 errors] in which case you would have to use a static html file & the server configuration to point to it.

as for setting the path - you will have to set your furls [more system settings] to "use friendly alias path'

also - clear your cache, with modx when in doubt clear the cache...

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top