CodeIgniter Forums
URL Routing 2 IDs - 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: URL Routing 2 IDs (/showthread.php?tid=31434)



URL Routing 2 IDs - El Forum - 06-18-2010

[eluser]Unknown[/eluser]
I am trying to route my website so that each game ID displays its respective game. So I could route it to www.mysite.com/game_id, but I want to add the client id to it as well so it would look like www.mysite.com/client_id/game_id (e.g. www.mysite.com/gba/23). The client ID can be any mix of letters while the game ID can be any number.

My only idea was to do:
Code:
$route[':any/(:num)'] = "game_start";

But I am thinking that it would mess up the routing of all other controllers. Is there a way to route this properly?


URL Routing 2 IDs - El Forum - 06-19-2010

[eluser]mi6crazyheart[/eluser]
Go through this user guide information...

Passing URI Segments to your Functions: http://ellislab.com/codeigniter/user-guide/general/controllers.html