SEO ディレクティブを尊重するために、次のサイトからのトラフィックをすべてリダイレクトしたいと考えています。
http://www.mywebsite.com
http://mywebsite.com
www.mywebsite.com
mywebsite.com
に
http://wvw.mywebsite.com/index.html
現時点ではこのコードを使用していますが、正しく動作しません:
RewriteCond %{HTTP_HOST} !^www.mywebsite.com$ [NC]
RewriteRule ^(.*)$ http://www.mywebsite.com/$1 [L,R=301]
RewriteRule ^$ index.html [L].
すべて動作しますがwww.mywebsite.com/index.html
、www.mywebsite.com
.