----- Original Message -----
From: J. Atwood <[EMAIL PROTECTED]>
> <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


_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to