.htaccessにおいて、
http://〜 → https://〜へのリダイレクトする記述です。
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
More than 5 years have passed since last update.
.htaccessにおいて、
http://〜 → https://〜へのリダイレクトする記述です。
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
Register as a new user and use Qiita more conveniently