我試圖將所有www.subdomain.example.com流量重定向到subdomain.example.com。目前,如果有人使用www,他們會收到一個錯誤,指出找不到服務器。我試圖將以下內容添加到.htaccess文件中:htaccess:將www.subdomian.example.com重定向到subdomain.example.com
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule^http://%1%{REQUEST_URI} [L,R=301]
但是,錯誤仍然存在。有沒有辦法解決這個問題?