我的 config/routes.php 文件中有以下内容:
$route['(:any)'] = "dashboard/index/$1";
这在访问以下 url 时按预期工作:mysite.com/user/id,仪表板控制器中的函数被调用,第一个参数是“用户”和第二个“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]
我的路线状况是否遗漏了什么?