mod_rewriteによるhttp→https強制変更

設定したいディレクトリを指定して、apacheのconfに以下を記述。

[code]RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L][/code]