# HTTP --> HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge.*
RewriteRule (.*)
https://%{HTTP_HOST}%{REQUEST_URI}
(EN) The .well-known/acme-challenge directory is used by ACME to ask for a Let's encrypt certificate. This won't work if the website redirects the directory into HTTPS.
(FR) Le répertoire .well-known/acme-challenge est utilisé par ACME pour demander un certificat Let's encrypt. Ça ne marchera pas si le site web redirige le répertoire vers HTTPS.
(EO) La dosierujo .well-known/acme-challenge uzantas de ACME por demandi atestilon Let's encrypt. Tio ne funkcios se la retejo alidirektas la dosierujon al HTTPS.