更新后htaccess重写停止工作

时间:2014-10-10 22:36:26

标签: php apache .htaccess mod-rewrite

我在我的htaccess文件中使用此代码,我确信它是正确的,但它不适用于我的新服务器。你可以在这里找到我的phpinfo文件:http://www.saint57records.com/test.php。我刚刚更新了我的apache,所以我不知道它是否存在。我试过寻找其他信息,但我找不到任何信息。

RewriteEngine On

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

1 个答案:

答案 0 :(得分:2)

在里面检查httpd.confapache2.confAllowOverride必须设为All

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

中查看
<Directory /your/directory>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>
相关问题