I have SSL enabled on all my website, but I only need it on two pages login.php and register.php, How can I disable it on all pages except these two? So when I redirect say from login.php to home page, I don't want eny warnings etc.
Thank You
解决方案
All modern browsers will display a warning if you leave a secure connection, so as soon as you've switched to HTTPS you should not switch back if you don't want a warning.
To switch to HTTPS for those two page use something like
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^login.php(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule ^register.php(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
For more examples see HERE.