Welcome Guest, Not a member yet? Register   Sign In
A question about URL's/Routing
#1

[eluser]Unknown[/eluser]
Hi there, before I begin I just want to say that I've just started using CI, and after checking out a couple of other Frameworks using the same MVC structure, CI is by far my favourite. Very impressed!

With that out the way I was just wondering how difficult it would be to change the url structure of the application so that instead of going through

Quote:index.php/USERS/some_function

in order to access a controller and its functions, you go through

Quote:index.php/USERNAME/some_function

and essentially replace the name of the controller with USERNAME, where USERNAME would be the users unique username pulled from either the database or session data.

Thanks in advance,

Matt
#2

[eluser]Glen Swinfield[/eluser]
I'm not sure if it's possible to use

Code:
$route[':any/methodname'] = "users/methodname";

there is no mention of it in the user guide? If it's not possible then I think a .htaccess rewrite rule is probably your answer.




Theme © iAndrew 2016 - Forum software by © MyBB