強迫apache使用https連線
要從程式寫一堆code去判斷,倒不如在apache中直接導掉
這麼好的功能,怎麼能不用呢!!
< directory "/www/" >
RewriteEngine on
Options +FollowSymLinks
Order allow,deny
Allow from all
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
< /directory >
近期迴響