Comodo entries in htaccess

GoWilkes

Well-Known Member
Sep 26, 2006
670
31
178
cPanel Access Level
Root Administrator
I found several topics on this, but no solution that seemed "great".

My issue is with these 3 lines added to the htaccess file before every RewriteCond:

Code:
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)?$
In my case, I have 26 RewriteCond lines, so now I have a huge, difficult to manage htaccess file. So I'm trying to come up with an alternative.

Can I not just place something like this at the top of the htaccess, then eliminate all of the duplicated lines?

Code:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/[0-9]+\..+\.cpaneldcv$ [OR]
RewriteCond %{REQUEST_URI} ^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ [OR]
RewriteCond %{REQUEST_URI} ^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ 
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule  (.*) - [L]