[Zope] Imitating SiteRoot in an accessrule

abg@comco-inc.com abg@comco-inc.com
Tue, 15 Jan 2002 10:06:37 -0600


Correct me if I'm wrong, but I don't believe an access rule is even
necessary with Enhanced VirtualHostMonster
(http://www.zope.org/Members/sfm/SiteAccessEnhanced). You just drop it in,
set your domain/subfolder mappings, and you're good to go.
 
> On Tue, Jan 15, 2002 at 04:35:54PM +0100, Ivo van der Wijk wrote:
> > Is it possible to imitate the behaviour of a SiteRoot object in an
> > access_rule? 
> > 
> > The basic idea is like this: Alot of virtual hosts point to 
> our Zope server,
> > and an access_rule in the / of the Zope server dispatches 
> request to the
> > appropriate subfolder.
> > 
> > This works perfectly, except that base href in generated 
> documents is wrong,
> > it includes the entire path, while I would like it to skip 
> the part up to
> > the actual root of the site.
> > 
> > This can be solved by installing a default SiteRoot in the 
> subfolders, but
> > I would rather not depend on all these SiteRoots (which 
> people will modify,
> > delete, etc, also the make managing these folders difficult)
> > 
> > Is it possible to adjust the SiteRoot/SiteBASE/?? directly 
> in my accessrule?
> 
> I have built virtual domains with only an access_rule and a
> VirtualHostMonster. Isa simple. I just manipulate the 
> taversal stack based
> on the HTTP_HOST var and voila, instant virtual hosts. You 
> can make this
> pretty generic and not need a SiteRoot object at all.
> 
> -- 
> Martijn Pieters
> | Software Engineer  mailto:mj@zope.com
> | Zope Corporation   http://www.zope.com/
> | Creators of Zope   http://www.zope.org/
> ---------------------------------------------
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> 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 )
>