URL中的点用下划线替换

时间:2013-11-20 14:52:05

标签: php apache codeigniter mod-rewrite url-rewriting

我在使用Rewrite的Apache上遇到了一些问题。 我的重写就像那样(对于一个旧的CodeIgniter):

RewriteCond $1 !(index\.php|index\.html)
RewriteRule ^(.*)$ index.php?/$1%{QUERY_STRING} [QSA]

如果我通过这种网址:

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"
}

不明白为什么所有的点都被替换了...... 欢迎任何想法!

由于

1 个答案:

答案 0 :(得分:1)

This thread建议采用以下解决方案:替换

$config['uri_protocol']  = 'AUTO'; 

...到......

$config['uri_protocol']  = 'REQUEST_URI';

在config.php文件中。

相关问题