Jump to content

Question

Posted

Hello,

 

While entering the main domain name for web hosting, the domain field does not accept capitalized domain names. Making the domain name small in the backend would have made more sense than to throw an error that the domain name isn't valid. According to Domain Names specification (RFC 2035), they are not only valid but identical. 

 

Normally,it wouldn't be a problem but while ordering via mobile, most phones are set to input capitalized words and that error isn't specific and confusing. So, I'd like to convince you guys to drop that check or alter it to make it small in the back end. 

 

Am I missing some logic here ? Your input is appreciated. 

 

Irrespective of your decision, I'd like a hack/change in code etc. for it. I don't think its very user friendly. Will/Can it cause problems ? Capital domain names

 

domain.png

7 answers to this question

Recommended Posts

  • 0
Posted

That error is defined in a module. I assume cPanel is what you're using?

You could update the regex that it is using to make it case-insensitive if you'd like, i.e.,

update /components/modules/cpanel/cpanel.php

find:

"/^([a-z0-9]|[a-z0-9][a-z0-9\-]{0,61}[a-z0-9])(\.([a-z0-9]|[a-z0-9][a-z0-9\-]{0,61}[a-z0-9]))+$/"

change to:

"/^([a-z0-9]|[a-z0-9][a-z0-9\-]{0,61}[a-z0-9])(\.([a-z0-9]|[a-z0-9][a-z0-9\-]{0,61}[a-z0-9]))+$/i"

and try again.

 

I'm not sure how cPanel will respond to the request for a domain with capital letters. It's possible they may reject it on their end, in which case you would need to make the domain lower case before sending.

  • 0
Posted

If you want to update the cPanel module again, same file as mentioned above, find and change this line:

'domain' => isset($vars['cpanel_domain']) ? $vars['cpanel_domain'] : null,

to:

'domain' => isset($vars['cpanel_domain']) ? strtolower($vars['cpanel_domain']) : null,

I think that would take care of it.

  • 0
Posted

If you want to update the cPanel module again, same file as mentioned above, find and change this line:

'domain' => isset($vars['cpanel_domain']) ? $vars['cpanel_domain'] : null,

to:

'domain' => isset($vars['cpanel_domain']) ? strtolower($vars['cpanel_domain']) : null,

I think that would take care of it.

 

 

any chance that could be part of every module mate?

  • 0
Posted

niyo's link suggests to me that this has happened before and reported and a "feature request" was opened to rectify this. But that was for Resellerclub. (In fact, the guy who reported it got confused with the same thing i.e wasn't working via mobile which just proves my theory.)

 

Guys come on, why can't we have this universally ? We want this, it enhances usability. Apparently everyone is hacking their code to get this done on one module or the other.   

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...