Routing question - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Routing question (/showthread.php?tid=6383) |
Routing question - El Forum - 02-25-2008 [eluser]evgeny_likov[/eluser] I want to make path like /users/25345. Is there a way to do it? (i heard, http://moddb.com based on codeigniter?) Routing question - El Forum - 02-25-2008 [eluser]xwero[/eluser] You can do this using routing Code: $route['user/:num'] = 'users/profile/$1'; Because you want to have /users/25345 to begin with i based the second url on that. I wrote users in singular form because you are going to see the data for that particular user not for a group of users. I also removed the view segment because that is the default action for a page. Seeing /users/view/12323/photos/23/54 i'm confused on what i'm exactly getting to see on that page. /users/12323/view/photos/23/54 makes more sense, not? You do it how you like it of course but because urls are public it's best not to mirror your classes and methods. Routing question - El Forum - 02-25-2008 [eluser]evgeny_likov[/eluser] thank you, xwero! |