If you have a purchase SSL certificate and http://www.example.com domain. and you want to redirect to https://www.example.com. it is possible to the .htaccess. first create a .htaccess file in your root project directory and paste the following code.

see following code example.


RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]