CodeIgniter URL添加后缀

通过配置/application/config/config.php文件的$config['url_suffix']值,可以为CodeIgniter生成的URL添加一个指定的文件后缀,注意不要漏了点

$config['url_suffix'] = '.html';

比如这个URL:example.com/index.php/products/view/shoes,如果配置后缀为html,那么跳转后的URL变为:example.com/index.php/products/view/shoes.html

posted @ 2015-07-29 09:32  iamsupercola  阅读(458)  评论(0编辑  收藏  举报