CodeIgniter Forums
Trouble when using route config in codeigniter 2.1 - 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: Trouble when using route config in codeigniter 2.1 (/showthread.php?tid=47446)



Trouble when using route config in codeigniter 2.1 - El Forum - 12-08-2011

[eluser]Unknown[/eluser]
Hallo everyone. I have trouble when using routing. I'm going to build multilanguage aplication in codeigniter 2.1. I tried this code in config/route.php:

Code:
$route['^(id|en)/(.+)$'] = "$2";
$route['^(id|en)$'] = $route['default_controller'];

when i try to access http://localhost/myapp/index.php/id/welcome it's not work, just 404 Page Not Found. I have tried in codeigniter 2.0.3 it just OK. why this happened?

Is there any change when using routing in codeigniter 2.1? What the best way to solf my problem. Thanks