AutoSSL and HTTP Redirects

Nahoo

Member
Oct 7, 2004
23
1
153
London, UK
cPanel Access Level
Root Administrator
Twitter
I use the following as the first redirection rule of the .htaccess:

RewriteCond %{REQUEST_URI} ^/(?:[0-9]+\..+\.cpaneldcv|[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?|\.well-known/acme-challenge/[0-9a-zA-Z_-]+)$
RewriteRule .* - [L,NC]

This will force the redirections to stop if there is a file match.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello @Nahoo,

I've moved this post to it's own thread. Could you let us know what lead you to creating this rule? Were the default rewrite exclusions added to the .htaccess file not working during the domain validation process?

Thank you.