XF 1.5 Reserved route conventions, e.g. pages, forums, page, post

TheLaw

Well-known member
I'm wondering whether anyone might be able to comment about reserved or non-recommended route conventions before I embark on something that could conflict with other current, planned or popular features. So I know that XF has its own, e.g. forums, pages, threads etc. I'm wondering if "page" is safe or something like "thread" is advisable. This also goes for conventions that might be used going forward or could be the potential for plugin conflicts, e.g. "docs" or "files". Same goes for questions about using single letters, e.g. /p/
 
This also goes for conventions that might be used going forward or could be the potential for plugin conflicts
Routes which may be used in the future will conflict with add-on or custom routes with the same name.
That is unavoidable but can be mitigated by using an unlikely route name.
 
Thanks for the comment. I've been learning by trial and error, such as "files" apparently being reserved by something and I'm guessing XF uses it. Was just testing it out and determining what the full array of options were before going forward with the plans. I'll need to use one that might since no other will do but I find it unlikely. Appreciate sharing your thoughts.
 
It is easy to change a route in XenForo. So technically it would be no problems to switch to a similar route if XenForo decides to use it later.

The only problem would be links to those pages from outside. Those will break.

I would add a character to my routes. So "lthread" or "l-thread" instead of "thread" or similar. It is unlikely that an add-on or XenForo uses such routes.
 
Thanks for the suggestion. Theoretically you're absolutely right and I can use something obscure or random too. But in addition to potential SEO issues I'm hoping to avoid for what are thousands of pages, I've got to nail this down right the first time to avoid 301 redirecting everything. And then there are the references made all over the site that would need to be found and manually addressed. And of course there is the eyesore to users who enjoy short urls they can type in to reach what they want, e.g. site.tld/files/ and not site.tld/all-kinds-of-stuff/ . Fortunately I found a road not taken with which I'm satisfied and a couple of things that ultimately don't clash either. We're all good, just curious as to reserved names and things to consider - e.g. with files being taken, I'm not going to use "file" because it likely could be used for something too and is too similar. Back to smooth sailing. :)
 
In addition, if you use "file" and XenForo starts to use "file" in the future, you can switch your real route to "x-file" and use the default XenForo route filter system to reroute XenForo's then new "file" to anthing else and your "x-file" to "file". So from any external point of view your files would stay at "file" and the new XenForo route would use another name.

It is really no problem at all. Absolutely no need to think about.
 
Back
Top Bottom