• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.