Routing issues. Multiple routing


I am making a site with multi language support. For the same purpose i am using a custom MY_Language library that is inserting a 2 letter code after the URL for the language.

In the config/routes.php file i added this code to remove the language code from the URL
$route['(\w{2})/(.*)'] = '$2';
$route['(\w{2})'] = $route['default_controller'];

This code is working just fine. But now i am unable to provide any more routes. Like, for example, I also want this route to be used
$route['captcha/(:any)'] = "captcha/index";

This route enable me to redirect captcha/0.3425 to captcha/index. Unfortunately, this is not working. I even tried this code
$route['(\w{2})/captcha/(:any)'] = "captcha/index";

Kindly help me out...


Also, if i put
$route['(\w{2})/captcha/(:any)'] = "captcha/index";
before [code]$route['(\w{2})/(.*)'] = '$2';
$route['(\w{2})'] = $route['default_controller']; [\code]

the problem seems to be gone... But is [code]$route['(\w{2})/(.*)'] = '$2';[\code] not supposed to do the same?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.