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

XF 1.2 Trouble re-creating URL Schema

Discussion in 'XenForo Questions and Support' started by Rob, Jan 27, 2014.

  1. Rob

    Rob Well-Known Member


    Im upgrading to 1.2 and have used an old route filter mod in the past.... Im now having to recreate the url schema and running into issues.

    I have successfully changed the route to individual forums:- /forums/shshs.xx
    I have successfully changed the route to individual threads /threads/asdjasjd.xx
    I have successfully changed the route to individual page nodes /pages.xx

    I have my site's index page set to portal (xenporta) leaving the main forum homepage at /forums .... however I need to change the main route (/forums) to something else. I also need to change the /pages main route.

    I dont see any provision in the new route filter to change top level routes and wondered if anyone else had tackled this... I think my old route filter was a @Brogan mod but trying to migrate all the settings is proving difficult.

    Any suggestions?


  2. Brogan

    Brogan XenForo Moderator Staff Member

    I didn't write an add-on for changing routes.

    I'm not sure what the problem is though, if you want to change forums/ to something else, just enter the new route.
    The same for the pages/ route.


    I can't speak for how that works with xenporta, I don't use that add-on so you will need to ask in the resource thread.
  3. Rob

    Rob Well-Known Member

    Hi brogan... sorry, I thought it was you... my memory is clearly not great, it could have been @Jake Bunce

    I have individual content routes working fine.... a single thread, a single forum, an single page node.... all working as desired.

    My issue is changing the main route itself, whilst leaving the leaf nodes...

    For instance....
    The main forum index, i want to be at /main
    Individual forums I want to be at /hubs/node-name.xx

    I know the system isnt really geared up that way but thats what i was hoping to recreate as that is the schema on the live site.

    Hope this makes a little more sense.
  4. Liam W

    Liam W Well-Known Member

    Just stick /forums into the find box, and /hubs into the replace box.

    Done. What's the issue?

    In the options, there a box for main page route. You'll want to set this to main once the filter is setup.

  5. Mike

    Mike XenForo Developer Staff Member

    He wants /forums -> /main and forums/<anything> -> hubs/<anything>.

    It's basically doable that way though:

    forums/ -> main/
    forums/{data} -> hubs/{data}

    I think that should work.
    Rob likes this.
  6. Rob

    Rob Well-Known Member

    @Mike yeah.... that really solved it!!!

    I had to do:-
    forums/ -> main/
    forums/{data}/ -> hub/{data}/

    The extra forward slashes in the final line make the difference.

    It would seem {data} is an undocumented feature. The instructions inside the admin pages refer to {name} and {name:digit} and {name:string}.
    Im not sure if there is a difference between {data} and {name} but thought I'd mention it incase the admin phrases can provide more info.
  7. Mike

    Mike XenForo Developer Staff Member

    "name" is whatever you want it to be. :)
    Rob likes this.

Share This Page