EllisLab text mark
Advanced Search
     
routes not working with mci package
Posted: 05 October 2012 12:45 PM   [ Ignore ]
Joined: 2012-09-24
23 posts

Hi,

this is my route file :
*/

$route[‘default_controller’] = “redireciona”;
$route[‘404_override’] = ‘’;

// All re-mappings must begin with ‘^(en|et|ru)’ !!!

$route[’^(en|pt)/(.+)$’] = “$2”;
$route[’^(en|pt)$’] = $route[‘default_controller’];


//novas rotas para o menu
$route[‘home’]            = ‘main_controller’;
$route[‘en/home’]            = ‘main_controller’;
$route[‘a-bysat’]          = ‘bysat_controller’;
$route[‘en/a-bysat’]          = ‘bysat_controller’;
$route[‘en/produtos-e-servicos’] = ‘prod_serv_controller’;
$route[‘produtos-e-servicos’]  = ‘prod_serv_controller’;
$route[‘en/casos-de-sucesso’]    = ‘casos_controller’;
$route[‘casos-de-sucesso’]    = ‘casos_controller’;
$route[‘en/trabalhe-conosco’]    = ‘trabalhe_controller’;
$route[‘trabalhe-conosco’]    = ‘trabalhe_controller’;
$route[‘en/entre-em-contato’]    = ‘contato_controller’;
$route[‘entre-em-contato’]    = ‘contato_controller’;
$route[‘en/contato’]          = ‘contato_controller/contato/’;
$route[‘contato’]          = ‘contato_controller/contato/’;
$route[‘casos_detalhes/(:num)’]  = ‘casos_controller/detalhes/’;
$route[‘en/casos_detalhes/(:num)’]  = ‘casos_controller/detalhes/’;
$route[‘segmentos/(:num)’]    = ‘casos_controller/segmentos/’;
$route[‘en/segmentos/(:num)’]    = ‘casos_controller/segmentos/’;


I have translated my website using mci language package but now the problem is link en/casos_detalhes/(:num) and en/segmentos/(:num) are not working but the other routes as in the links are working very fine ..Someone please help if you know what is happening ...

Thank You

 
Posted: 09 October 2012 10:06 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2012-09-24
23 posts

Nobody Knows?

 
Posted: 09 October 2012 12:34 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2009-02-19
3801 posts

Not working how?  You’re not using them to send a value to the function.

$route['en/segmentos/(:num)']    'casos_controller/segmentos/$1'//send the captured number 
 Signature 
 
Posted: 09 October 2012 02:22 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Joined: 2012-09-24
23 posts

I did put your code in my routes.php and not working see the code:

$route['en/casos_detalhes/(:num)']  'casos_controller/detalhes/$1';
$route['en/segmentos/(:num)']       'casos_controller/segmentos/$1'

and again the error:

404 Page Not Found
The page you requested was not found.

Destiny url:
http://localhost/en/casos_detalhes/26


And I tried change the $1 variable to $2 and that too not work

 
Posted: 10 October 2012 08:27 AM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Joined: 2012-09-24
23 posts

Anyone knows please help ??