• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Route Filters

kkm323

Well-known member
#21
There is not enough words to describe my love for this new feature. How would I go if I want to convert pages url from
pages/example
to
/example

I don't like the use of pages in the url?

Again this is a very powerful feature and it only proves the amount of work you put on the product. Thank You
 

Brogan

XenForo moderator
Staff member
#22
You can't replace a route with nothing so you would have to do it per page, as per the examples in the first post.
 

AlexT

Well-known member
#24
This option lets you allow a URL to work but it doesn't affect what's considered the canonical version. So maybe we want to have releases/114 take us to our 1.1.4 release threads/xenforo-1-1-4-released.47030/ but we want the original URL to be the real URL. We could do that by putting threads/xenforo-1-1-4-released.47030/ in the find box and releases/114 in the replace box. I'm aware this might seem backwards, but the system is written from the perspective of outgoing conversions, so find represents the URL XF is generating; the incoming conversion reverses it. It means that you don't have to swap the values in find/replace if you check/uncheck the incoming only option.
Congrats Mike, this is simply fantastic. (y)

I wonder how route filters handle HTTP response codes. Would it add redirect codes? In the case where outgoing URLs are rerouted, it would probably make sense to apply 304 redirects for the old URLs. But what to use in the case of URL aliases where the original URL is supposed to be kept? A 304 redirect would erase the original URL from search engines. Would that be a case of a temporary redirect?
 

tenants

Well-known member
#26
That's very good. This means many add-ons can be more easily customised for users that don't like playing around with the route prefixes in PHP.
That's something I wanted to do when I tried my first add-on, I'm sure many people will want the same
 

Luxus

Well-known member
#27
Does this also redirect old routes to new routes? With the route changer addon if you change /resources to /downloads, you can still access the resource manager with /resources. If someone posts an old /resources link and google picks it up, it would be duplicated content.
 

AlexT

Well-known member
#28
Does this also redirect old routes to new routes? With the route changer addon if you change /resources to /downloads, you can still access the resource manager with /resources. If someone posts an old /resources link and google picks it up, it would be duplicated content.
See my post above. It depends on how the route filter uses HTTP response codes whether it's considered duplicate content or not.
 

Mike

XenForo developer
Staff member
#29
Route filters don't do HTTP response codes at all. They simply translate URLs to/from the default format from/to the custom format. Most important pages do URL canonicalization though, so you will effectively get a 301 if you go to the wrong URL.

The default URLs will likely still work, as long as you haven't created a conflict.

It's very possible that you can create conflicts using this system (imagine threads/ -> forums/), so you will need to make sure you don't do that. (Of course, if you did threads/ -> forums/, you could probably then do forums/ -> threads/ and you'd simply flip the meaning of them.)
 

faeronsayn

Well-known member
#34
I sense some sort of CMS coming from xenForo in the near future. This feature would be a great addition to a CMS with custom routes or in wordpress terminology custom permalinks.
 

Markos

Well-known member
#40
What's the impact on performance / server load as increasingly more route filters are added?

I'm not sure about the limitations of this, can we do this for the whole forum:

Change: http://xenforo.com/community/threads/route-filters.47946/

to: http://xenforo.com/forum/forum_id/route-filters.47946/ ?

and

Change: http://xenforo.com/community/forums/have-you-seen/

to:

http://xenforo.com/forum/forum_id/ ?

In other words change the complete URL structure similar to what vbseo used to do for vb, or is the system not designed for this purpose? Also how does it impact SEO, does it deal well with that (i.e. no duplicate content)?
I'm also interested in this...i need a hierarchical structure and i want to know if with route filters can i change the default structure of links...if not, a feature for change the url structure like vbseo and wordpress will be integrated in 1.2?