Apache httpd で http でアクセスされた https にリダイレクトする
Apache 入門ブログみたいになってるけど。
設定内容
# /etc/httpd/conf.d/rewrite.conf <IfModule mod_rewrite.c> RewriteEngine On RewriteCond "%{SERVER_PORT}" "^80$" RewriteRule "^(.*)$" "https://%{SERVER_NAME}$1" [R,L] </IfModule>
Apache の configtest をしてからリロードするのを忘れずに
# apachectl configtest # service httpd restart
まとめ
https 最高!