CodeIgniter Forums
Problem with routes and URI - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Problem with routes and URI (/showthread.php?tid=53492)



Problem with routes and URI - El Forum - 07-26-2012

[eluser]Pades[/eluser]
Hi. I have URI Language Identifier on my website I did it according to directions on codeigniter WIKI. It works fine but after that my segments changed. But How Can I get name of controller because $this->uri->segment(2) = id and $this->uri->segment(1) = name of the metod.

This is my routes.php

Code:
$route['default_controller'] = "page";
$route['404_override'] = '';
$route['(\w{2})/(.*)'] = '$2';
$route['(\w{2})'] = $route['default_controller'];

Thanks for reply.