目前我正在尝试学习 CodeIgniter。
这有效:
http://localhost/NewsPage/index.php/news/fenerana
但我想让它在以下情况下工作:
http://localhost/NewsPage/news/fenerana
我怎样才能做到这一点?我当前的 routes.php 文件是:
$route['news/(:any)'] = 'news/view/$1';
$route['news'] = 'news';
$route['(:any)'] = 'pages/view/$1';
$route['default_controller'] = 'pages/view';