My undertstanding is that AutoSSL requires mod_rewrite rules to work. Like this:
But if I put this in the .htaccess file before I run AutoSSL, I get security warnings in the browser, but the same thing happens if I enable AutoSSL before editing the .htaccess file.
What is the best way to enable AutoSSL and install the cPanel certificate without disrupting a live web site (so that visitors do not get a security warning)?
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=302]
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=302]
But if I put this in the .htaccess file before I run AutoSSL, I get security warnings in the browser, but the same thing happens if I enable AutoSSL before editing the .htaccess file.
What is the best way to enable AutoSSL and install the cPanel certificate without disrupting a live web site (so that visitors do not get a security warning)?