sakura wwwありなし

①www有り
  RewriteEngine on
  RewriteCond %{HTTP_HOST} ^yyy\.com
  RewriteRule (.*) http://www.yyy.com/$1 [R=301,L]
  (最後は空白行)

  ②www無し
  RewriteEngine on
  RewriteCond %{HTTP_HOST} ^www\.yyy\.com
  RewriteRule (.*) http://yyy.com/$1 [R=301,L]
  (最後は空白行)

  ③index有り
  RewriteEngine on
  RewriteRule ^$ /index.html [R=301]
  (最後は空白行)

  ④index無し
  RewriteEngine on
  RewriteCond %{THE_REQUEST} ^.*/index.html
  RewriteRule ^(.*)index.html$ /$1 [R=301,L]
  (最後は空白行)

初期ドメインリダイレクト
Redirect /zback1/sugaryawd/ “http://sugaryawd.com/”

ダブルパンチ例
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.2youngc\.com
RewriteRule (.*) http://2youngc.com/$1 [R=301,L]

RewriteEngine on
RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ /$1 [R=301,L]

ダブルパンチ例

トリプルパンチ
Redirect /zback1/sugaryawd/ “http://sugaryawd.com/”

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.sugaryawd\.com
RewriteRule (.*) http://sugaryawd.com/$1 [R=301,L]

RewriteEngine on
RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ /$1 [R=301,L]

index.php含み
Redirect /zback2/mirto/ “http://http://www.mirto.jp/”

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mirto\.jp
RewriteRule (.*) http://www.mirto.jp/$1 [R=301,L]

RewriteEngine on
RewriteCond %{THE_REQUEST} ^.*/index.(html|php)
RewriteRule ^(.*)index.(html|php)$ /$1 [R=301,L]