Welcome Guest, Not a member yet? Register   Sign In
How MVC in twitter working?
#6

[eluser]xwero[/eluser]
The problem with a one segment url that can be anything is that you have to add all the controllers that also can be called using a single segment.
Code:
$route['(shop|blog)(.*)'] = '$1$2'; // example of a few controllers that can have a single segment url
$route['([a-zA-Z0-9_\-]+)'] = 'users/profile/$1';
The username segment is best limited to the constraints of the username input, for example if the username has to be at least 4 characters the regex would be ([a-zA-Z0-9_\-]{4,}). This cuts down the checks for none existing usernames.


Messages In This Thread
How MVC in twitter working? - by El Forum - 04-23-2009, 12:09 AM
How MVC in twitter working? - by El Forum - 04-23-2009, 12:37 AM
How MVC in twitter working? - by El Forum - 04-23-2009, 04:49 AM
How MVC in twitter working? - by El Forum - 04-23-2009, 04:56 AM
How MVC in twitter working? - by El Forum - 04-23-2009, 05:04 AM
How MVC in twitter working? - by El Forum - 04-23-2009, 05:06 AM
How MVC in twitter working? - by El Forum - 04-23-2009, 05:09 AM
How MVC in twitter working? - by El Forum - 04-23-2009, 05:20 AM
How MVC in twitter working? - by El Forum - 04-23-2009, 05:25 AM
How MVC in twitter working? - by El Forum - 04-23-2009, 05:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB