【发布时间】:2014-08-24 14:46:37
【问题描述】:
所以我将article.php?id=10 缩短为article/10。这一切似乎都很好。但我几乎不知道它毁了我的其他 URL。所以对于http://localhost/forgot/,我必须去http://localhost/forgot/index 才能真正到达它。这是我正在使用的
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^article/([0-9]+)$ article.php?id=$1
RewriteRule ^([^\.]+)$ $1.php [NC,L]
我想去http://localhost/forgot/ 而不是http://localhost/forgot/index/ 有什么想法吗?
【问题讨论】: