Reaching out to others! Free & Open Source Software, Kannada, L10n, L18n Data Science, Cloud Computing & more…

To redirect http requests to https on your Apache web server use .htaccess and add the following rewrite rules.

RewriteEngine On
RewriteCond     %{SERVER_PORT} ^80$
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]

You can also add it inside the virtual host entry of the domain for which you need this redirect.