I want to know if there is any way to shorten urls in a codeigniter using .htaccess. Like for example I have example.com/user/account/settings, I would like to shorten the url to example.com/settings. In the same way we remove index.php from the address bar, is there a way to remove more items from the same?
2条回答 默认 最新
- douwo8358 2012-07-08 12:44关注
It's done by
routes.php
file in your CodeIgniter application folder. Documentation.For your example it would be really easy, just add a line to the file:
$route['settings'] = 'user/account/settings';
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报