为什么'索引'不符合这个重写规则?

这里是我所有的重写规则:( 没有别人 – 这是所有的人)

RewriteEngine On RewriteRule ^$ index.php?action=index RewriteRule ^([\w]+)$ index.php?action=$1 

当我访问:

 mysite.com/test 

PHP脚本index.php的确被调用, $_GET['action']设置为按照预期进行test

但是,当我访问:

 mysite.com/index 

PHP脚本报告$_GET是空的。 为什么这只发生在index

可能与您的DirectoryIndex设置有关:

http://www.phpfreaks.com/forums/mod_rewrite/mod_rewrite-and-directoryindex/