Redirect http to https with apache via .htaccess
Redirecting your website from http to https is extremely easy using apache. If you your website has been running on http it is important to redirect all incoming http links to https. This way you won’t lose traffic coming from your previously indexed pages and backlinks.
Before redirecting http to https you need to make sure that SSL certificate is properly installed on your server and the mod_rewrite is enabled in Apache.
If you meet the prerequisites above then edit your httpd.conf file and add the following snippet at the very top of your file.
Please note that you can also redirect single pages from http to https in Apache by inserting the following code snippet in your configuration file or .htaccess file. Do make sure though to update the code with your actual domain name and URL slug.