Не знаю на счет стабильности, скорости и корректности кода, но вот мой вариант:
Модуль core:
Меняем функцию index до строчки $cat_path = $this->uri->uri_string(); включительно
public function index($uri = null) {
$page_found = FALSE;
$without_cat = FALSE;
$SLASH = '';
$mod_segment = 1;
$data_type = '';
$com_links = array();
if ($uri){
$this->uri->uri_string = $uri;
// Извращение - массив segments начинается с единицы
$this->uri->segments = array_merge(array(0),explode('/',$this->uri->uri_string));
unset($this->uri->segments[0]);
}
$cat_path = $uri ? $uri : $this->uri->uri_string();
В конец класса добавляем функцию
function route(){
$uri = func_get_args();
$path = implode('/', $uri);
$this->index($path);
}
(в случае если версия PHP 5.6+):
function route(...$uri){
$path = implode('/', $uri);
$this->index($path);
}
В application/config/routes.php пишем:
(при установленных двух языках: английском и русском)
$route["function"] = "core/route/module/function";
$route["function/(.*)"] = "core/route/module/function/$1";
$route["ru/function"] = "core/route/ru/module/function";
$route["ru/function/(.*)"] = "core/route/ru/module/function/$1";
$route["en/function"] = "core/route/en/module/function";
$route["en/function/(.*)"] = "core/route/en/module/function/$1";
Где function - имя функции, module - название модуля.
Кто может улучшить - напишите пожалуйста.
Не забываем - при таком способе создаются дубли страниц!