• 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

Rob

Well-known member
#1
Hi,

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?

Thanks,

Rob
 

Brogan

XenForo moderator
Staff member
#2
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.

http://xenforo.com/help/route-filters/

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.
 

Rob

Well-known member
#3
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.
 

Liam W

Well-known member
#4
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.

Liam
 

Mike

XenForo developer
Staff member
#5
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

Well-known member
#6
@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.