Welcome Guest, Not a member yet? Register   Sign In
URL path aliasing
#1

[eluser]Bacteria Man[/eluser]
I would like to implement URL path aliasing for accessing user profiles.

For example when accessing my user profile

member/39952

the URL path would be instead

member/bacteria_man

where a regular expression would shift all alpha letters to lower case and replace the space with an underscore. Other unfriendly characters would either be converted accordingly or disallowed completely when defining a user name.

Since the system will eventually have 1000's of users it's obviously not practical nor efficient to predefine routes for all of these associations.

I'm wondering (at least for my specific need) if it would be easier to simply store the alias in the user profile and query against the alias (which, based on the user name, is unique) instead of the ID.

Is there a more elegant or better way to go about this? All comments/suggestions greatly appreciated.


Messages In This Thread
URL path aliasing - by El Forum - 08-11-2007, 10:30 AM
URL path aliasing - by El Forum - 08-11-2007, 11:16 AM
URL path aliasing - by El Forum - 08-11-2007, 11:44 AM
URL path aliasing - by El Forum - 08-11-2007, 11:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB