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

Redirect HTTP request to HTTPS

linux, QuickFix, Technical | 0 comments

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.

Related Articles