Add the following lines to the .htaccess file .


RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule . https://%{SERVER_NAME}/%{REQUEST_URI} [R,L]