用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2046|回复: 1
收起左侧

[HELP] 添加URL后缀后,无法删除index.php。。。

[复制链接]
发表于 2013-5-6 14:34:06 | 显示全部楼层 |阅读模式
我照着官网上写了.htaccess文件。
RewriteEngine on
RewriteCond $1 !^(index\.php|public|uploads|mapinfo\.xml|user_guide|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

URL变成了这样:
http://localhost/project/products
正常!

之后又想添加URL后缀。
在config.php中修改:
$config['url_suffix'] = '.html';

然后把base_url()改成了site_url();

URL后缀是出来了,可是变成了:
http://localhost/project/index.php/products.html

怎么在添加URL后缀的同时删除index.php呢???

发表于 2013-5-7 11:02:04 | 显示全部楼层
肯定是config.php里的$config['index_page'] = '';没有有改

本版积分规则