MyBB Community Forums

Full Version: Custom SEO-Urls containing slashes causing strange behaviour
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey there. I'm currently trying to improve short URLs in my forum, like this:
example.com/forumdisplay.php?fid=12&page=4 becomesĀ example.com/forum/12/page/4,
example.com/usercp.php becomes example.com/account, and so on.


To do so, I created a set of htaccess rules and (after a long, long search in inc/ - is there a dev documentation of the MyBB system out there, so we can actually understand how everything works together without reverse engineering it?) modified the SEO-URL links in init.php.


After activating seo urls, some links work, others don't. Instead of example.com/forum/12 I get example.com/forum/forum/12, instead of example.com/forum/12/thread/21 there's example.com/forum/thread/21.


For reference, I've attached both code snippets. Any help with this would be greatly appreciated.
It's because MyBB uses relative urls everywhere.

You should consider using something like - instead of / unless you want to fix things all over the place.
(12-11-2014, 10:14 PM)frostschutz Wrote: [ -> ]It's because MyBB uses relative urls everywhere.

You should consider using something like - instead of / unless you want to fix things all over the place.

I'm all for fixing things all over the place. I'd love even making a RESTful URL scheme- hence the question regarding a developer documentation?

I know there are easier ways. But I've got free time and would like to invest it into this software...