标签: .htaccess codeigniter
我讨厌codeigniter自定义网址,它位于:domain.com/controller/action/username
我怎样才能像普通网站一样:domain.com/username
请给我一个建议。
答案 0 :(得分:4)
你在routes.php中试试这个
$route['(:any)'] = "controller/action/$1";
以下是路由文档: routing
答案 1 :(得分:2)
请参阅http://ellislab.com/codeigniter/user-guide/general/routing.html。您可以通过URL路由