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

Can we customize the url pattern?

cedivad

Active member
#3
No, mod_rewrite do nothing in this case. I don't want to convert the old url structure to the new one but change the new one to fit the old one. It's possible in ipb.
 

cedivad

Active member
#5
No =)

In the case of this forum mod rewrite takes the url and "pass it" to the controller (index.php). Index.php that decides what to do with the requested url by calling some php classes.
 
#6
Well i guess we can if we can modify the regexes etc but if urls are hard coded into the templates then we might need to change them also.
 

cedivad

Active member
#7
I think (and hope) that they did something like ipb, where every urls is generated from a common set of "functions". This way you edit it once and it reflect in output (function => url) and input (requested url => decide witch class to call) urls, really great.

BTW... if anyone noticed, i always talk about IPB. I think they did an amazing framework and they have an amazing platform with some amazing features, but what they miss is the way user integrate with all that stuff. xF centered the point in this sector =)
 

Mike

XenForo developer
Staff member
#8
All the URLs go through functions, though the approach is for the URLs that we have. You could certainly change them by modifying the "routes" (both building and parsing).
 

Ahmed

Well-known member
#10
No =)

In the case of this forum mod rewrite takes the url and "pass it" to the controller (index.php). Index.php that decides what to do with the requested url by calling some php classes.
I think (and hope) that they did something like ipb, where every urls is generated from a common set of "functions". This way you edit it once and it reflect in output (function => url) and input (requested url => decide witch class to call) urls, really great.

BTW... if anyone noticed, i always talk about IPB. I think they did an amazing framework and they have an amazing platform with some amazing features, but what they miss is the way user integrate with all that stuff. xF centered the point in this sector =)
Aaha, I got what you mean just now.

All the URLs go through functions, though the approach is for the URLs that we have. You could certainly change them by modifying the "routes" (both building and parsing).
That's just great. :)
 

Mike

XenForo developer
Staff member
#14
The reason for the ID being on the right is mostly for left-to-right reading. The use of a dot for separation is important to avoid ambiguity in a few areas (both in how the URL could be read and technical ambiguity, though mostly the latter).

The URLs were actually 123-title-here for a long time, so it wouldn't be a particularly hard change, though you'd be hacking the files to do it at least initially.
 

Tigratrus

Well-known member
#16
The reason for the ID being on the right is mostly for left-to-right reading. The use of a dot for separation is important to avoid ambiguity in a few areas (both in how the URL could be read and technical ambiguity, though mostly the latter).

The URLs were actually 123-title-here for a long time, so it wouldn't be a particularly hard change, though you'd be hacking the files to do it at least initially.
Sweet. That's probably what we'll want to do as well as our VBSEO urls are 123-title-here. I understand that XF would handle the 301 redirects, but if we can replicate the original it'd have to be less load etc...
 

Mike

XenForo developer
Staff member
#17
Note that I did say it'd be file edits. :)

Regardless, trying to map another forum's URLs into ours directly isn't a good idea. When importing, the IDs may well change (very likely would). It really needs to go through something that can map that.
 

cedivad

Active member
#18
Since that you have yet to finalize the importer, i'm sure you can edit a few lines of it and at least for topic make the Urls Ids fit the old one =)
Else we can do it ;)
 

Tigratrus

Well-known member
#19
Note that I did say it'd be file edits. :)

Regardless, trying to map another forum's URLs into ours directly isn't a good idea. When importing, the IDs may well change (very likely would). It really needs to go through something that can map that.
Good point. You're dead right, the id's would almost certainly change. Well, 301's exist for a for a reason! ;).