I need to create numbers only sub domains e.g. 123456.mydomain.com 123457.mydomain.com etc.
The java script check on the sub-domain will only let me add a sub domain if it starts with a letter.
Can I change this so I can add numbers only sub-domains?

Comments

jvieille’s picture

Very strange indeed.
Actually no number at any place are accepted in the subdomain term. For example, I defined a subdomain abc12345 for an OG group, only abc is kept. Then, any subdomain string such as abc, abc123, abc3456... reaches the subdomain.
Is there any valid reason numbers are prohibited / eliminated in subdomain names???

inventlogic’s picture

The original specification of hostnames in RFC 952, mandated that labels could not start with a digit or with a hyphen, and must not end with a hyphen. However, a subsequent specification (RFC 1123) permitted hostname labels to start with digits.

There is a flag setting in the includes file subdomain.inc around line 150.

Are we going to allow the subdomain to start with a numeral (RCC 1123)?
 if (!variable_get('subdomain_allow_rfc1123', TRUE)) {

You can change it to TRUE and get subdomains starting with numbers.

The removal of the digits at the end might also be played out in the same file but i don't recall having that problem.

jvieille’s picture

Status: Active » Closed (duplicate)