WPMU and Let's Encrypt

Hello!

Our host gave us a rewriting rule to allow Let’s Encrypt to work properly with WPMU (I believe it’s for the domain validation so renewals would work). This rule works well, but every time we create a new site, we have to edit the .htaccess file.

Here are the provided rules.

RewriteCond %{HTTP_HOST} ^vitreriemorin.ca [NC]
RewriteCond %{REQUEST_URI} !^/[0-9]+..+.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}.txt(?: Comodo DCV)?$
RewriteCond %{REQUEST_URI} !^/.well-known/pki-validation/[A-F0-9]{32}.txt(?: Comodo DCV)?$
RewriteRule ^(.*)$ https://www.vitreriemorin.ca/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^constructionbrunocouture.ca [NC]
RewriteCond %{REQUEST_URI} !^/[0-9]+..+.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}.txt(?: Comodo DCV)?$
RewriteCond %{REQUEST_URI} !^/.well-known/pki-validation/[A-F0-9]{32}.txt(?: Comodo DCV)?$
RewriteRule ^(.*)$ https://www.constructionbrunocouture.ca/$1 [L,R=301]

As you can see, it’s repeating for every site, so every time we create a new site, we have to edit the .htaccess file, copy paste the rule and its conditions to finally rename the domain name.

Without this rule, the site won’t load over HTTPS.

Does anybody know if we could have the rule once and apply it to all domains? It’s always the same URL syntax, no exceptions.

Kind regards,

Vince