Hi, I have installed Let’s Encrypt SSL on my domain and I can install it when there is no redirect to www.domain.com in .htaccess, but when it is present in my .htaccess file, I can’t install or renew cert.
My .htaccess:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteCond %{HTTP_HOST} ![0-9]$ [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
**Operating system:Centos 7.7