create file: /etc/httpd/conf.d/redirect-443.conf,
with this content:

---------------------------------------------------------------------
RewriteEngine On

# Never forward request for .well-known (important when using Let's Encrypt)
RewriteCond %{REQUEST_URI} !^/.well-known

# Next 2 lines: Force redirection if incoming request is not on 443
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}$1 [L]

---------------------------------------------------------------------

restart apache: systemctl restart httpd

computer2know :: thank you for your visit :: have a nice day :: © 2024