In case you are on Ubuntu, edit the file /etc/apache2/apache2.conf (here we have an example of /var/www):<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted</Directory>并将其更改为:<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted</Directory>还要检查您网站的 Apache 配置文件/etc/apache2/sites-available/your_site.conf:also check Apache configuration file for your website /etc/apache2/sites-available/your_site.conf:<Directory /var/www/your_site_path/> AllowOverride None</Directory>并将其更改为:<Directory /var/www/your_site_path/> AllowOverride All</Directory>你需要做 sudo a2enmod rewrite 来启用模块重写You need to do sudo a2enmod rewrite to enable module rewrite那么,sudo 服务 apache2 重启sudo service apache2 restart希望对您有所帮助! 这篇关于只有默认的永久链接工作 wordpress 其他人成为 404 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-15 06:55