您好,我在Drupal CMS中遇到了一個問題。我在網上瀏覽,但我沒有發現任何結果。在不同的地方,我們讀取打開的.htaccess文件,並從開始取消註釋以下行的刪除哈希標記,但這是行不通的,請幫助我。如何在drupal中將非www重定向到www url
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# uncomment the following:
# RewriteCond %{HTTP_HOST} .
# RewriteCond %{HTTP_HOST} !^www\. [NC]
# RewriteRule^http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
取消註釋該代碼的最後3行。如果它不起作用,你沒有安裝/啓用mod_rewrite。 – Clive