【发布时间】:2011-03-24 23:00:21
【问题描述】:
我的 config/routes.php 文件中有以下内容:
$route['(:any)'] = "dashboard/index/$1";
当访问以下网址时,这将按预期工作:mysite.com/user/id,仪表板控制器中的函数被调用,第一个参数是'user'和第二个'id'。但是,当通过 post 并获取诸如 mysite.com/user/id?page=2 之类的值时,该函数似乎忽略了 post 参数,并且第一个(也是唯一的)参数是 '2'。
我的 config.php 文件具有以下值:
$config[‘uri_protocol’] = “AUTO”;
$config[‘enable_query_strings’] = TRUE;
和.htaccess:
RewriteEngine on
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
我的路线状况是否遗漏了什么?
【问题讨论】:
标签: php codeigniter codeigniter-url