我有这条规则:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !index.php
RewriteRule ^(.*)$ index.php?req=$1
</IfModule>
如果我请求myhost/view/blah
等不存在的目录,一切正常,但是当我在myhost/module
这样的网址中输入一些现有目录时,我会被重定向到module/?req=module
而不是留在{ {1}}
我做错了什么? 我需要一些东西将所有内容重定向到index.php(当然除了index.php)。