Comodo / DCV entries in htaccess
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:
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?
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 offbut 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?
-
Hello, There really isn't a way to do this, the rewrites must be added as a part of the DCV process. What version of cPanel & WHM are you using? 0 -
WHM v78.0.47... I can't update any further until I've rebuilt 100 websites to use MySQLi instead of MySQL :-( 0 -
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: 0
Please sign in to leave a comment.
Comments
3 comments