简体   繁体   English

htaccess重写在更新后停止工作

[英]htaccess rewrite stopped working after update

I am using this code in my htaccess file, and I am confident that it is right, but it is not working on my new server. 我在htaccess文件中使用此代码,并且我确信它是正确的,但是在新服务器上不起作用。 You can find my phpinfo file here: http://www.saint57records.com/test.php . 您可以在这里找到我的phpinfo文件: http : //www.saint57records.com/test.php I just updated my apache, so I don't know if it is something there. 我刚刚更新了我的Apache,所以不知道那里是否有东西。 I have tried finding other information but I can't find any. 我尝试查找其他信息,但找不到任何信息。

RewriteEngine On

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

Check httpd.conf or apache2.conf inside , AllowOverride must be set to All 检查里面的httpd.confapache2.confAllowOverride必须设置为All

If you are using Ubuntu check this in /etc/apache2/apache2.conf 如果您使用的是Ubuntu请在/etc/apache2/apache2.conf中进行检查

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM