【发布时间】:2020-10-01 19:46:08
【问题描述】:
我在 AWS EC2 中托管了一个 WordPress 站点并将我的本地迁移到 AWS。现在主页工作正常,但其他页面打不开。它返回 404。在 .htaccess 中尝试了以下操作-
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
然后在 apache2.conf 中
<Directory />
Options FollowSymLinks
AllowOverride All
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride All
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
仍然没有运气。我尝试更改永久链接结构,但没有保存。我一直点击保存更改按钮,什么也没有。
【问题讨论】:
标签: wordpress amazon-web-services amazon-ec2