如果我使用野生动物园浏览器,则无法访问我的网站example.com。我必须使用www.example.com才能正常工作。我尝试编辑htaccess多次,但仍然无法正常工作。我的网站使用的是bitami wordpress图像(https://docs.bitnami.com/)which托管在AWS中。
Bitnami工程师在这里:
默认情况下,由于安全和性能原因,我们禁用.htaccess文件。我们还将.htaccess
文件的内容移动到文件夹/ opt / bitnami / apps / wordpress / conf中名为htaccess.conf
的文件中。您可以在https://docs.bitnami.com/aws/infrastructure/lamp/administration/use-htaccess/上查看有关此内容的更多信息。
如果要启用.htaccess使用,则需要将其设置为AllowOverride All
文件中的/opt/bitnami/apache2/conf/bitnami/bitnami.conf
:
<VirtualHost _default_:80>
DocumentRoot "/opt/bitnami/apache2/htdocs"
<Directory "/opt/bitnami/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All <---- HERE
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3 >
Require all granted
</IfVersion>
</Directory>
并在应用更改后重新启动Apache。
有关更多信息,请在下面找到WordPress文档:https://docs.bitnami.com/aws/apps/wordpress/
问候