2014-10-10 172 views
0

我在我的htaccess文件中使用此代码,我相信它是正确的,但它不适用于我的新服务器。你可以在这里找到我的phpinfo文件:http://www.saint57records.com/test.php。我刚刚更新了我的Apache,所以我不知道它是否在那里。我试图找到其他信息,但我找不到任何信息。htaccess重写更新后停止工作

RewriteEngine On 

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

我有这个设置为All

问题,我通过添加'Options -MultiViews'来关闭该功能来解决这个问题。解决了我的重写问题! – worldofjr 2014-10-10 22:39:15

+0

你在哪里添加它? – 2014-10-10 22:40:14

+0

如果'Options -MultiViews'不起作用(将其添加到.htaccess中),请检查以下答案:http://serverfault.com/questions/77347/why-is-this-mod-rewrite-rewriterule-directive-not -htaccess-file/77362#77362 – 2014-10-10 22:40:33

回答

2

检查httpd.confapache2.conf内,AllowOverride必须的,如果您使用的是Ubuntu检查这个/etc/apache2/apache2.conf中

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