我在启用"重写"的Apache上遇到了一个小问题。我的重写是这样的(对于一个旧的CodeIgniter):
RewriteCond $1 !(index'.php|index'.html)
RewriteRule ^(.*)$ index.php?/$1%{QUERY_STRING} [QSA]
如果我通过这种URL:
http://server.fr/seg1/seg2/email/aaa@bbb.fr/other/1.3
如果我在index.php的开头记录$_GET变量,我会得到以下信息:
array(2) {
["email"]=>
string(10) "aaa@bbb_fr"
["other"]=>
string(3) "1_3"
}
不明白为什么所有的点都被替换了。。。欢迎有任何想法!
感谢
更换
$config['uri_protocol'] = 'AUTO';
到
$config['uri_protocol'] = 'REQUEST_URI';
在config.php文件中。