my codeigniter application config:
$config['enable_query_strings'] = TRUE;
$config['uri_protocol'] = 'PATH_INFO';
所以我可以这样访问我的应用程序:index.php?c=index&m=about
但是我在"application/controllers/setting/"目录下有一个名为user.php的控制器
如果mod_rewrite是启用的,我可以访问:index.php/setting/user/someMethod
但是我如何像这样访问它:index.php?c=setting/user&m=someMethod
404 Not Found
日志文件显示:
ERROR - 2011-08-11 08:03:07 --> 404 Page Not Found --> settinguser
编辑
答:
index.php?d=setting&c=user&m=someMethod
您可以像这样访问它们
index.php?d=setting&c=user&m=someMethod
如果您有子目录,则需要目录触发器。它在你的config.php
文件中,但是它有experimental
注释。
$config['allow_get_array'] = TRUE;
$config['enable_query_strings'] = TRUE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in use