Sep 2006
Sat, 23 Sep 2006
# Underscores in Domain Names
Without much thinking I set up a test domain for a PHP based CMS containing an
underscore (www_example.your.domain). The web interface to the domain server
accepted the domain name without a problem. Subsequently I tested the CMS with
Firefox, everything worked fine. Then I wanted to try everything with Internet
Explorer (6.0, XP, SP2) and the merchandising system surprisingly did not work.
Searching for the error it turned out that logins also did not work, so the session management was quickly blamed. Trying to narrow the error down even a simple:
session_start();
print_r($_SESSION);
$_SESSION['x'] = 1;
did not work as expected. Then I vaguely remembered that IE did not like
underscores in cookie names. So I tried www-example.your.domain and bingo.
Checking RFC 1738 section 3.1: only a-z, 0-9 and - are allowed. So it's
indeed a broken domain name. Strange that the DNS system did pass it through
though.
posted at 23:57 | path: /unix | permanent link to this entry
