This tutorial describes, how to use https (SSL) via .htaccess. (I prefer the solution via v-hosts, but if you don't have access to it you have to use .htaccess)
There are 3 solutions for https via .htaccess
1.) Insert this two lines to your .htaccess-file:
2.) If you want to bind it at the ssl-port:
3.) To redirect all http-requests to https use this:
There are 3 solutions for https via .htaccess
1.) Insert this two lines to your .htaccess-file:
Code:
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
2.) If you want to bind it at the ssl-port:
Code:
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
3.) To redirect all http-requests to https use this:
Code:
RewriteCond %{SERVER_PORT} ^80$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]