我有类别页面和子类别页面。我想根据类别动态重写URL。我想更改为以下url结构
sitename.com/used-cars/Audi到sitename.com/used-Audi-cars
我的控制器名称是cars,现在重写为二手车
$route['used-cars'] = "cars/used-cars";
你应该试试这个
$route['used-cars/(:any)'] = 'cars';
$route['used-cars/(:any(']='cars/$1';