25 May
2000
25 May
'00
9:25 p.m.
----- Original Message ----- From: J. Atwood <jatwood@bwanazulia.com>
<dtml-let hostname="_.string.join(_.string.split(_.string.split(HTTP_HOST, ':')[0], '.')[-2:], '.')" sitemap="{'subdomain.domain.com': 'subdomain'}"> Do we have a match? <dtml-if expr="sitemap.has_key(hostname)"> Set the logical root: <dtml-call "REQUEST.set('SiteRootPATH', '/')"> Add physical root: <dtml-call "REQUEST.path.append(sitemap[hostname])"> </dtml-if> </dtml-let>
The [-2:] chops off all but the last two elements of the domain name, so you're comparing "domain.com" to "subdomain.domain.com" and failing. You need to either change it to [-3:], or use different matching logic. Cheers, Evan @ digicool & 4-am