◆FTPソフトを使って SSLに統一(WordPress)
「.htaccess」ファイルへ追記
※「.htaccess」ファイルは必ずバックアップを取っておく事!
.htaccessでリダイレクトを設定する
従来の「http://~」アドレスでアクセスしてくる人たちを「https://~」にリダイレクトする設定を行います。
そのために.htaccessというファイルに追記を行います。
.htaccess の一番上(# BEGIN WordPressよりも上)に以下を記述します。
RewriteEngine on RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
「.htaccess」ファイルの場所
追記位置
◆wwwあり・SSLに統一
「.htaccess」ファイルへ追記
# wwwありで統一 RewriteCond %{HTTP_HOST} ^example\.jp RewriteRule ^(.*)$ http://www.example.jp/$1 [R=301,L] # https に統一 RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L] # QHM Configuration : End