Jump to content

Route Filters

Matt C.

Recommended Posts

What do "route filters" do specifically in Xenforo? i.e. what are you after exactly?

So lets say I have the IP.Gallery addon. The default route is forum.com/gallery/. Route filters would allow me to change it to /photos or whatever I wanted. Same for any other URL, even for 3rd party addons.

Link to comment
Share on other sites

yea. It's really a nice and powerful feature in XF.

The url in ipb(and probably ips4) it's always

app=x&module=y&section=bazinga&do=foo and there's no easy way to change this (sorry if i'm wrong, i'm really not THAT familiar with ipb3) e.g. what about a way to translate the url and change




or what if somebody wants to translate the "page" part in the url?


would become


in xenforo you don't have a strict url with app=x&xxx there are only route prefixes (e.g. member, forum, thread, post) and each of them have a own route class, responsible to build the url and also to resolve the variables and return the needed controller and action name, very similar to http://symfony.com/doc/current/book/routing.html and http://framework.zend.com/manual/1.10/en/zend.controller.router.html

And the filters allow you to manipulate the url without any additional addons http://xenforo.com/help/route-filters/

Link to comment
Share on other sites

  • 2 weeks later...

I'm not familiar with Xenforo's implementation so I'm not really sure how to answer that question.

Friendly URLs are totally customisable. There's a page in the ACP where you have a list of the "friendly URLs" and the query strings they "map" to (that is, what the URL would be if friendly URLs was turned off). You can edit them and add new ones - there's special tags you enter to indicate where parameters and the "SEO title" should go. It applies even to third party applications.

It doesn't do any backwards-compatibility. So if you change /gallery to /photos, the former won't redirect to the latter - you'd need to set up a forwarder using htaccess for incoming traffic from search engines.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...