#完全リダイレクト Redirect permanent / https://teien.atrise.work/ #404エラー時リダイレクト ErrorDocument 404 http://sample.com # httpからhttpsにリダイレクト RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] # index.html無しのURLに統一 RewriteCond %{THE_REQUEST} ^.*/index.(html|php) RewriteRule ^(.*)index.(html|php)$ https://winefile.net/$1 [R=301,L] # www無しのURLに統一 RewriteCond %{HTTP_HOST} ^www\.winefile\.net RewriteRule ^(.*) https://winefile.net/$1 [R=301,L] # ドメイン全体のリダイレクト RewriteCond %{HTTP_HOST} ^winefile.online RewriteRule ^(.*) https://winefile.net/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^www.winefile.online RewriteRule ^(.*) https://winefile.net/$1 [R=301,L] #キャッシュ保存 ifModule mod_expires.c> ExpiresActive On ExpiresByType image/png "access plus 6 months" ExpiresByType image/jpg "access plus 6 months" ExpiresByType image/jpeg "access plus 6 months" ExpiresByType image/x-icon "access plus 6 months" ExpiresByType text/css "access plus 1 months" ExpiresByType text/javascript "access plus 1 months" ExpiresByType application/x-font-ttf "access plus 6 months" ExpiresByType application/javascript "access plus 1 months" ExpiresByType application/x-javascript "access plus 1 months" /IfModule>