Alex Gould wrote:
> My apologies if this question has been answered before, but I couldn't
> figure it out from available documentation or list archives.
> I run a server for some student groups off a machine in my dorm and I'm
> teaching myself Zope (slowly).  I deal with the dynamic IP address by
> using several * domains.  I would like to set up one
> or more virtual hosts such that points
> to some folder in the Zope database.  It seems this is possible using
> Set Access Rule and SiteRoot objects, but how?  Any help is
> appreciated.  I am now using plain zserver 2.1.6.

I have answered this before :)

This is the access rule I use to match subdomains with a folder that has the
same name as the subdomain:

Get subdomain:
<dtml-let hostname="_.string.join(_.string.split(_.string.split(HTTP_HOST,
':')[0], '.')[0], '')">
Is there a folder named as this subdomain?
     <dtml-if "_[hostname]">
        Set logical root: <dtml-call "REQUEST.set('SiteRootPATH', '/')">
        Add physical root: <dtml-call "REQUEST.path.append(hostname)">   
   <dtml-except KeyError>
      <dtml-call "RESPONSE.redirect('')">

Then there has to be a site root in each folder, where the path and base are

Hope that helps,

ethan mindlace fremen
Zopatista Community Liason

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to