Php 更新后,htaccess重写停止工作

Php 更新后,htaccess重写停止工作,php,apache,.htaccess,mod-rewrite,Php,Apache,.htaccess,Mod Rewrite,我在我的htaccess文件中使用了这段代码,我相信它是正确的,但它在我的新服务器上不起作用。您可以在此处找到我的phpinfo文件:。我刚刚更新了我的apache,所以我不知道它是否存在。我试图找到其他信息,但找不到 RewriteEngine On RewriteCond %{REQUEST_URI} !^/artists/index.php.* RewriteRule ^artists/(.+)$ artists/index.php?artist=$1 [L] 检查http

我在我的htaccess文件中使用了这段代码,我相信它是正确的,但它在我的新服务器上不起作用。您可以在此处找到我的phpinfo文件:。我刚刚更新了我的apache,所以我不知道它是否存在。我试图找到其他信息,但找不到

RewriteEngine On

RewriteCond %{REQUEST_URI} !^/artists/index.php.*
RewriteRule    ^artists/(.+)$    artists/index.php?artist=$1 [L]

检查
httpd.conf
apache2.conf
内部,
AllowOverride
必须设置为
All

如果您使用的是
Ubuntu
请在/etc/apache2/apache2.conf

<Directory /your/directory>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

选项如下符号链接
允许超越所有
要求所有授权

我遇到了这个问题,我通过添加
选项-多视图来关闭该功能,从而解决了这个问题。解决了我的重写问题!您在哪里添加的?如果
选项-多视图
不起作用(将其添加到.htaccess),请检查此答案:在
重写引擎打开
和条件之间。这两个答案都不起作用