Welcome Guest, Not a member yet? Register   Sign In
Regular Expression ROUTE
#1

[eluser]yannyannyann[/eluser]
Hi,

i can't find the right solution to my problem:

I have a bilingual website.

//english:
mysite.com/controler/function/
//french:
mysite.com/fr/controler/function/

For the page controler I'd like to removed the segment "index".

Code:
// Remove index
$route['page'] = 'page';
$route['page/(.*)'] = 'page/index/$1';

// Language (fr or en)
$route['(\w{2})/(.*)'] = '$2';
$route['(\w{2})'] = $route['default_controller'];

// this works:
mysite.com/page/help
// but this provokes a 404 error:
mysite.com/fr/page/help


Any idea ?
I am pretty sure I have to add something ot this line :
Code:
$route['page/(.*)'] = 'page/index/$1';

But What ?!


Messages In This Thread
Regular Expression ROUTE - by El Forum - 01-28-2010, 10:13 AM
Regular Expression ROUTE - by El Forum - 01-28-2010, 09:28 PM
Regular Expression ROUTE - by El Forum - 01-29-2010, 03:37 AM
Regular Expression ROUTE - by El Forum - 01-29-2010, 03:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB