• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
want to create a url like http://www.example.com/uername

#5
[eluser]boltsabre[/eluser]
not working... any error messages? what's not working

$route[(:num)] = "user/profile/$1";

I would have expected that to work... is your profile function accepting variables? The $1 is a function variable. For example
Code:
public function profile($user_id){

}

If that's not the problem, try this rule, does it work?
$route[u/(:num)] = "user/profile/$1";

I don't have a great deal of experience with routing, perhaps it needs actual 'controller' to 'controller' mapping (for want of a better expression), what I mean is, maybe the first parameter cannot actually be a variable (number in your case), you may have to settle for a url that looks like :domain.com/u/11234


Messages In This Thread
want to create a url like http://www.example.com/uername - by El Forum - 06-20-2012, 08:10 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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