Comodo / DCV entries in htaccess


Well-Known Member
Sep 26, 2006
cPanel Access Level
Root Administrator
I might end up redoing all of this anyway, but for now...

My normal .htaccess is about 5kb in size, with 38 RewriteRules. With the Comodo entries, though, my file is nearly 20kb!

I had originally "fixed" it by adding this to the top of the file:

RewriteCond %{REQUEST_URI} ^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} ^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} ^/\.well-known/pki-validation/((?:\ Ballot169)?|[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?)$
RewriteCond %{REQUEST_URI} ^/\.well-known/(?:acme-challenge|cpanel-dcv)/[0-9a-zA-Z_-]+$
RewriteEngine off
but that doesn't work anymore; I'm not sure when, but it looks like at some point Apache started to only look at the last RewriteEngine command so this turns the entire engine off, regardless of the conditions.

I'd like to keep my .htaccess file smaller and easy to read, so can you guys and gals suggest a way to modify this so that I don't have 15kb of the same RewriteCond over and over?


Product Owner II
Staff member
Nov 14, 2017
Do you mean to use the PHP MySQLi connection instead of mysql_connect? This has been deprecated since PHP 5.5 and completely removed in PHP 7 - PHP: mysql_connect - Manual

PDO_MySQL or MySQLi are the alternatives and there's a bunch of information on how to convert your connection strings to utilize them:

There are even some tools available that claim to be able to do this though I haven't personally used them and can't vouch for their usability I did find one here: