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

[讨论/交流] 关于去除uri去除index.php导致site_url 还出现index.php的问题

[复制链接]
发表于 2013-5-1 15:27:10 | 显示全部楼层 |阅读模式
我使用 site_url 生成访问路径

但是我去除index.php访问,添加.htaccess

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f        
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

之后 生成的路径依然 存在 index.php  

请问在这个问题请大家 帮忙想想是什么问题。因为我不想更改源码  所以在这里请教各位大神?



 楼主| 发表于 2013-5-1 15:29:57 | 显示全部楼层
查看源码  找到了 关键点

$config['index_page'] = 'index.php';

需要改为

$config['index_page'] = '';
 楼主| 发表于 2013-5-1 15:30:30 | 显示全部楼层
问题 解决。

本版积分规则