In order to make your website SSL enabled, you need a certificate (you can buy one from www.verisign.com), mod_rewrite module enabled server and access to .htaccess. When you have all three, open htaccess in an editor.
To always redirect a user to secure connection (https://), add the following lines to the .htaccess file:
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ [R,L]
Here, the .htaccess should be located in root directory of your server.
To enable HTTPS only for a particular folder, use this:
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} foldername RewriteRule ^(.*)$ [R,L]
Here, the .htaccess file should be placed inside the directory where you need to enable HTTPS.
To enable HTTPS only on a page or two, you can use the following rewrite rules:
RewriteRule ^page1(.*) https://%{SERVER_NAME}/page1$1 [R,L] RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}