Welcome Guest, Not a member yet? Register   Sign In
routes and multi-language
#1

[eluser]hydevision[/eluser]
Hello,

I've just started using codeigniter and I've got a question about routing. I've added an config item called multi_lang which can be TRUE or FALSE. When TRUE a language identifier get's added to my url, like this http://www.sitename.com/eng/blog .

I've got two controllers, one for frontend (page) and one for admin.

Now I've got the following routes:

Code:
$route['beheer'] = 'admin';
$route['beheer/:any'] = 'admin';
$route['beheer/:any/:any'] = 'admin';
$route['beheer/:any/:any/:any'] = 'admin';
$route[':any'] = 'page';
$route[':any/:any'] = 'page';
$route[':any/:any/:any'] = 'page';
$route[':any/:any/:any/:any'] = 'page';
$route['default_controller'] = 'page';
$route['(\w{2})/(.*)'] = '$2';
$route['(\w{2})'] = $route['default_controller'];
$route['scaffolding_trigger'] = "";

When multi_lang = FALSE I can reach the admin section. But when I set it TRUE all request are transferred to the page controller. Anybody an idea what routes to set so I can reach the admin controller with multi_lang = TRUE?


Messages In This Thread
routes and multi-language - by El Forum - 10-02-2010, 02:27 AM
routes and multi-language - by El Forum - 10-02-2010, 04:22 AM
routes and multi-language - by El Forum - 10-03-2010, 12:52 AM
routes and multi-language - by El Forum - 10-03-2010, 02:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB