MyBB Community Forums

Full Version: Username in Profile URLs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wondering if it's possible to have the username work in a URL instead of the UID.

For example:
http://community.mybb.com/member.php?act...er=brootal
Instead of the default:
http://community.mybb.com/member.php?act...&uid=11019

Is this already implemented or is there a way around this? I've searched but I couldn't find what I was looking for.

Thanks in advance.
Google SEO plugin will make it into something like:

http://harajuju.net/User-brad-t
(2012-12-24, 03:36 AM)brad-t Wrote: [ -> ]Google SEO plugin will make it into something like:

http://harajuju.net/User-brad-t

This would be very useful for something I was trying to figure out as well. Do you know if it can be set to work both ways with that plugin? Meaning the uid variation and username variation of a url both direct to that same user? Or, does it simply change it to the other method altogether? (not trying to hijack thread; please don't mind my question, op)
(2012-12-24, 03:45 AM)CheckingThis Wrote: [ -> ]
(2012-12-24, 03:36 AM)brad-t Wrote: [ -> ]Google SEO plugin will make it into something like:

http://harajuju.net/User-brad-t

This would be very useful for something I was trying to figure out as well. Do you know if it can be set to work both ways with that plugin? Meaning the uid variation and username variation of a url both direct to that same user? Or, does it simply change it to the other method altogether? (not trying to hijack thread; please don't mind my question, op)

It automatically redirects MyBB default URL variants to the Google SEO versions. This is in case there are links on the web using your previous URL structure.
You could change the rule to be /member.php?action=profile&user=[USERNAME]. If you wanted the default structure but with name rather than id.
user=username would not work with Google SEO, as it does not expect the username that way.

If you want to stay dynamic, you could do member.php?action=profile&username. This dynamic style was introduced to support sites which can't rewrite URLs for some reason.

See also the documentation for other URL possibilites.

I recommend to stick with User-name though (i.e. the default settings).