我在我的网站中实施了Slug功能我可以通过http://www.example.com/controller_name/slug_name访问网页 但现在我想访问该网页而不在URL中显示controller_name。就像WordPress Slug功能一样。
我想通过slug通过http://www.example.com/slug_name网址直接访问域名后的网页。 我怎么能在Codeigniter中做到这一点。
提前致谢!
答案 0 :(得分:0)
当您在application / config / routes.php文件中描述所需内容时,此效果可以实现。 https://ellislab.com/codeigniter/user-guide/general/routing.html
$route['world-travel-locations'] = 'videos/index';