http://からhttps://にしたとき
自動で転送させたい場合は.htaccessに記入に下記を記入する
1 2 3 4 5 | <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://sample.com/$1 [R=301,L] </IfModule> |
http://からhttps://にしたとき
自動で転送させたい場合は.htaccessに記入に下記を記入する
1 2 3 4 5 | <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://sample.com/$1 [R=301,L] </IfModule> |
俺の俺による俺のための備忘録なのでトラブルが起きても責任持てません。