LoginSignup
5

More than 3 years have passed since last update.

posted at

updated at

Organization

5分でロリポップ!を無料SSL化する手順

  • タイトル通りです。
  • 公式ページにも、SSL化するHow toは書かれているのですが、それだけだとhttpからhttpsへのリダイレクトができません
  • なので、そこまでサクッと行きます。

1. ロリポップの管理ページでSSL化申請。

  • ここまでは公式ページに書かれています。
  • マイページのセキュリティと書かれたタブをクリックします。
  • 「SSLで保護されていないドメイン」のタブを開き、SSL化したいドメインを選択して、SSL設定のボタンを押します。
  • 5分くらいで有効かされるので、その間にhttpsリダイレクト設定をしましょう。

2. HTTPSリダイレクト設定

  • ftpを使うので、なんらかのFTPクライアントソフトを使ってください。(私はMacでサイバーダック使ってます)
  • 対象となるドメインのルートディレクトリへ行って、以下のような.htaccessをおいてください。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
  • ちなみによくwordpressの.htaccessに描く場合はこう描くといいらしいです
# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
  • 以上です!

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
5