【发布时间】:2014-07-08 17:42:23
【问题描述】:
在做了一些研究后,我仍然不确定为什么这个重写规则在我的服务器上不起作用,我检查了多个主机,但无济于事,问题出在:-
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
上面的最后一行没有为 index.php 上的 GET 提供任何东西,这意味着 $_GET 是空的。有什么建议吗?
PS:尝试实现这个 -> https://github.com/panique/php-mvc/blob/master/.htaccess
【问题讨论】:
-
你能显示你要测试的 URL 吗?
标签: php apache .htaccess mod-rewrite