所以问题是我使用了.htaccess来隐藏index.php,但是我仍然像这样得到了url中的控制器名称:http://example.com/name_controller/about我的问题是:是否有可能隐藏控制器的名称,以便只显示方法?hxxp://example.com/name_controller/about
发布于 2010-06-08 00:38:34
您可以在config/routes.php中定义自定义路由-例如:
$route['about'] = 'name_controller/about';
Then, http://example.com/about
goes to http://example.com/name_controller/about有关更多信息,请参阅CI论坛中的Hiding the controller’s method name in the URL?。
https://stackoverflow.com/questions/2991323
复制相似问题