簡體   English   中英

非 www 到 www 不適用於使用 safari 的 EC2 實例中的 wordpress

[英]non www to www not working for wordpress in EC2 instance using safari

如果我使用 safari 瀏覽器,則無法訪問我的網站 example.com。 我必須使用 www.example.com 才能使其工作。 我嘗試多次編輯 htaccess,但仍然無法正常工作。我的網站使用的是托管在 AWS 中的 bitami wordpress 圖片 ( https://docs.bitnami.com/ )。

Bitnami工程師在這里:

默認情況下,出於安全和性能原因,我們禁用 .htaccess 文件。 我們還將.htaccess文件內容移動到文件夾 /opt/bitnami/apps/wordpress/conf 中名為htaccess.conf的文件中。 您可以在https://docs.bitnami.com/aws/infrastructure/lamp/administration/use-htaccess/查看更多相關信息。

如果要啟用 .htaccess 用法,則需要在/opt/bitnami/apache2/conf/bitnami/bitnami.conf文件中將其設置為AllowOverride All

<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/

問候

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM