I am just learning mvc structure. In my mvc directory,
I have a .htaccess file which contains this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
The idea is to redirect all the requests to index.php like:
http://www.domain.com/mvc/test
will be
http://www.domain.com/mvc/index.php?url=test
It is working fine.
But when I am trying to pass this:
http://www.domain.com/mvc/index
hoping to be converted to
http://www.domain.com/mvc/index.php?url=index
But it is not working.
I’ve seen some tutorial videos where this works.
There must be some settings which I don’t know.
1 回答
尝试在htaccess中禁用MultiViews: