Apache / CentOS 8 / Linux / Server Apache Rewrite HTTP to HTTPS on CentOS 8 by Nissaar10/02/202010/02/2020 Rewrite HTTP to HTTPS 1. Edit vhost to add the following lines to it: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L] 2. Restart Apache systemctl restart httpd