concrete5のページをhttpからhttpsへリダイレクト

.htaccessに以下の2行追加するだけ。

RewriteCond %{HTTP:X-Forwarded-Proto} ^http$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

.htaccess全体は以下の通り。

DirectoryIndex index.php index.html index.cgi

# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP:X-Forwarded-Proto} ^http$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
# -- concrete5 urls end --