php - Cannot get rid of default controller in URL with multilingual codeigniter -


when land on home page www.domain.com (with default controller 'home') browser redirects www.domain.com/en/home. see www.domain.com/en (google see these pages duplicate content think?)

is possible leave default controller out of url language follows domain i.e. www.domain.com/en?

here code below:

$route['default_controller'] = "home"; $route['404_override'] = '';  // '/en', '/es' uris -> use default controller $route['^(en|es)$'] = 'home'; //$route['default_controller']; //'home'    // route es translation of girls girls $route['es/chicas'] = "girls"; $route['es/chicas/chica/(:num)/(:any)'] = "girls/girl/$1/$2"; $route['es/chicas/etiquetas/(:num)/(:any)'] = "girls/tags/$1/$2";  // movies es routes $route['es/peliculas'] = "movies"; $route['es/peliculas/pelicula/(:num)/(:any)'] = "movies/movie/$1/$2"; $route['es/fotos/galeria/pelicula/(:num)/(:any)'] = 'photos/gallery/movie/$1/$2'; $route['es/peliculas/etiquetas/(:num)/(:any)'] = "movies/tags/$1/$2";  $route['es/unirse'] = "join";  // general catch doesn't fit rules above, doesn't have  // language prefix e.g. en/girls -> girls controller $route['^(en|es)/(.+)$'] = "$2"; 

it's config/route.php file. update routes want exactly.


Comments