Redirect http to https using htaccess

Browsing your site over secure connection (HTTPS). One of the easy way to redirect the user to secure connection can be done by using .htaccess. The sample code for Redirect http to https using htaccess as follow