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

[HELP] 去除了index.php后不能通过get传递参数了

[复制链接]
发表于 2015-3-30 13:00:45 | 显示全部楼层 |阅读模式
.htacss配置规则
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /ci/index.php?/$1 [L]


通过URL传递参数 接受不到
如:
/controller/action?id=2
var_dump($_REQUEST)
输出
array(1) { ["/controller/action"]=> string(0) "" }


去除重新规则
/index.php/controller/action?id=2
var_dump($_REQUEST)
输出
array(1) { ["id"]=> string(1) "2" }
可以接受到数据


如何才能再去除index.php的情况下 能request到参数?

本版积分规则