routes - can i do this? |
[eluser]MMCCQQ[/eluser]
hi! i build a webapp . so i want this i got Profile URL: CASE 1 http://domain.com/mmccqq and i got Other URL with Numbers: CASE 2 http://domain.com/7879874 so i wanna do this too: http://domain.com/mmccqq/add_comment http://domain.com/7879874/photos i got this: CASE 1: $route['(:any)'] = "main/index/$1"; CASE 2: $route['(:num)'] = "v/index/$1"; its right?
[eluser]Wuushu[/eluser]
How will it know if it's a variable/username or controller name you are requesting? Or perhaps you have no other controllers other than main and v?
[eluser]frenzal[/eluser]
you can do it, i don't think the index shouldbe in your route though unless you don't want to use other functions in your controller but it looks like you do
|
Welcome Guest, Not a member yet? Register Sign In |