mobbdeep Posted September 30, 2018 Report Posted September 30, 2018 Hello, Is there a plugin out that allows certain TLD's from being a supported TLD when purchasing my web hosting service? For example, I want to block .tk TLD's from being supported. Regards, Tyler Quote
0 Blesta Addons Posted October 1, 2018 Report Posted October 1, 2018 9 hours ago, mobbdeep said: Hello, Is there a plugin out that allows certain TLD's from being a supported TLD when purchasing my web hosting service? For example, I want to block .tk TLD's from being supported. Regards, Tyler i think you are talking about hosting module not registrar module ? Quote
0 mobbdeep Posted October 4, 2018 Author Report Posted October 4, 2018 On 10/1/2018 at 1:48 AM, Blesta Addons said: i think you are talking about hosting module not registrar module ? Where do I find this? Quote
0 mobbdeep Posted October 9, 2018 Author Report Posted October 9, 2018 I am still needing an answer to this. I have been getting a mass influx of someone using .ga, .tk, and .cf TLD's to purchase my web hosting for fraudulent sites. Quote
0 Blesta Addons Posted October 9, 2018 Report Posted October 9, 2018 4 hours ago, mobbdeep said: I am still needing an answer to this. I have been getting a mass influx of someone using .ga, .tk, and .cf TLD's to purchase my web hosting for fraudulent sites. if you are using cpanel module, open the file /components/modules/cpanel/cpanel.php and change the line from 'cpanel_domain' => [ 'format' => [ 'rule' => [[$this, 'validateHostName']], 'message' => Language::_('Cpanel.!error.cpanel_domain.format', true) ], 'test' => [ 'rule' => ['substr_compare', 'test', 0, 4, true], 'message' => Language::_('Cpanel.!error.cpanel_domain.test', true) ] ], to 'cpanel_domain' => [ 'format' => [ 'rule' => [[$this, 'validateHostName']], 'message' => Language::_('Cpanel.!error.cpanel_domain.format', true) ], 'test' => [ 'rule' => ['substr_compare', 'test', 0, 4, true], 'message' => Language::_('Cpanel.!error.cpanel_domain.test', true) ], 'block' => [ 'if_set' => true, 'rule' => ['matches', '/(.ga|.tk|.td|.cf)/'], 'message' => 'this domain is not alowded' ], ], not tested. but it might work Quote
0 mobbdeep Posted October 9, 2018 Author Report Posted October 9, 2018 8 hours ago, Blesta Addons said: if you are using cpanel module, open the file /components/modules/cpanel/cpanel.php and change the line from 'cpanel_domain' => [ 'format' => [ 'rule' => [[$this, 'validateHostName']], 'message' => Language::_('Cpanel.!error.cpanel_domain.format', true) ], 'test' => [ 'rule' => ['substr_compare', 'test', 0, 4, true], 'message' => Language::_('Cpanel.!error.cpanel_domain.test', true) ] ], to 'cpanel_domain' => [ 'format' => [ 'rule' => [[$this, 'validateHostName']], 'message' => Language::_('Cpanel.!error.cpanel_domain.format', true) ], 'test' => [ 'rule' => ['substr_compare', 'test', 0, 4, true], 'message' => Language::_('Cpanel.!error.cpanel_domain.test', true) ], 'block' => [ 'if_set' => true, 'rule' => ['matches', '/(.ga|.tk|.td|.cf)/'], 'message' => 'this domain is not alowded' ], ], not tested. but it might work This did not work. I can still choose any of those extensions and proceed onto the order form. Quote
0 Blesta Addons Posted October 10, 2018 Report Posted October 10, 2018 14 hours ago, mobbdeep said: This did not work. I can still choose any of those extensions and proceed onto the order form. are you using cpanel ? or other module to sell hosting ? Quote
1 Blesta Addons Posted October 10, 2018 Report Posted October 10, 2018 i have tested the code now, you can use this regex 'cpanel_domain' => [ 'format' => [ 'rule' => [[$this, 'validateHostName']], 'message' => Language::_('Cpanel.!error.cpanel_domain.format', true) ], 'test' => [ 'rule' => ['substr_compare', 'test', 0, 4, true], 'message' => Language::_('Cpanel.!error.cpanel_domain.test', true) ], 'block' => [ // 'if_set' => true, 'rule' => ['matches', '/^((?!.ga|.tk|.td|.cf).)*$/'], 'message' => 'this domain is not alowded' ], ], Paul and mobbdeep 1 1 Quote
0 mobbdeep Posted October 10, 2018 Author Report Posted October 10, 2018 9 hours ago, Blesta Addons said: i have tested the code now, you can use this regex 'cpanel_domain' => [ 'format' => [ 'rule' => [[$this, 'validateHostName']], 'message' => Language::_('Cpanel.!error.cpanel_domain.format', true) ], 'test' => [ 'rule' => ['substr_compare', 'test', 0, 4, true], 'message' => Language::_('Cpanel.!error.cpanel_domain.test', true) ], 'block' => [ // 'if_set' => true, 'rule' => ['matches', '/^((?!.ga|.tk|.td|.cf).)*$/'], 'message' => 'this domain is not alowded' ], ], This worked. Thank you! Paul and Blesta Addons 2 Quote
Question
mobbdeep
Hello,
Is there a plugin out that allows certain TLD's from being a supported TLD when purchasing my web hosting service? For example, I want to block .tk TLD's from being supported.
Regards,
Tyler
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.