我的 mod_rewrite 没有遇到另一个问题,首先,时间是我的 .htaccess 文件:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^news/([0-9]+)/?$ /news?id=$1 [L,QSA]
RewriteRule ^contact/([0-9]+)/?$ /contact?do=$1 [L,QSA]
RewriteRule ^account/([a-zA-Z]+)/?$ /account?action=$1 [L,QSA]
RewriteRule ^admin/([a-zA-Z]+)/?$ /admin?action=$1 [L,QSA]
RewriteRule ^login/([a-zA-Z]+)/?$ /login?action=$1 [L,QSA]
RewriteRule ^register/([a-zA-Z]+)/?$ /register?action=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L] <- This line doesn't work
RewriteRule ^([\w\d~%.:_\-]+)$ index.php?page=$1 [L,QSA]
除了RewriteRule ^([^.]+)$ $1.php [NC,L]之外,所有行都正常工作, 当我使用此行时,所有其他规则都会中断。
我究竟做错了什么?