Apache 重写规则在新服务器上不工作

Apache 重写规则在新服务器上不工作,apache,.htaccess,mod-rewrite,Apache,.htaccess,Mod Rewrite,我有下面的重写规则,但由于某些原因它不起作用 RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^grants/$ /grants/index.php RewriteRule ^grants/([a-zA-Z0-9,_-]+)/$ /grants/index.php?action=$1 [QSA] 我在httpdocs本地有一个grants文件夹,在grants文件夹中有一个index.php和被请求文件的名称,例如grants/dashboard

我有下面的重写规则,但由于某些原因它不起作用

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^grants/$ /grants/index.php
RewriteRule ^grants/([a-zA-Z0-9,_-]+)/$ /grants/index.php?action=$1 [QSA]
我在httpdocs本地有一个grants文件夹,在grants文件夹中有一个index.php和被请求文件的名称,例如grants/dashboard=grants/index.php?action=dashboard

但出于某种原因,这是行不通的。它在我的旧服务器上工作,但我已迁移到新服务器

任何帮助都将不胜感激


非常感谢

没关系,现在就解决了。增加

Options -MultiViews

没关系,现在解决了。增加

Options -MultiViews