[Zope] REQUEST vraible methods

Chris Withers chrisw@nipltd.com
Fri, 10 Mar 2000 12:54:06 +0000


Hmmm,

Not sure I get you, and I'm not sure my explanation was clear... ;-)

I'm only dealing with one server, which hosts several sites.
Each site is in its own directory off Zope's root.
eg: http://zope-host.nipltd.com/mydomain

Each of these sites has its own domain name, which is virtually hosted using
Apache as a front end into Zope. 
eg: www.mydomain.com --> http://zope-host.nipltd.com/mydomain

Now, we typically maintain the sites with:
http://zope-host.nipltd.com/manage
and navigate through the links from there.

However, site owners may maintain the site with, for example:
http://www.mydomain.com/manage.

Also, currently, wherever there's an absolute_url() or the like, such as in the
management screens or in Squishdot sites, links are generated as follows when
accessing through www.mydomain.com:
eg: http://www.mydomain.com/mydomain/manage

If you follow these links, they work through the magic of aquisition but,
through following several such links, you can end up with rediculous URLS.
eg: http://www.mydomain.com/mydomain/mydomain/mydomain/mydomain/manage

I think SiteAccess's Site Root's are designed to sort this out. You drop a Site
Root with a path of / into the /mydomain folder.
Unfortunately, this site root also affects access through
http://zope-host.nipltd.com/manage and so if you try and follow the link to
http://zope-host.nipltd.com/mydomain/manage_workspace you in effect get
redirected to http://zope-host.nipltd.com/manage_workspace 'cos the Site Root
strips out the /mydomain.

Also, if you go to http://zope-host.nipltd.com/mydomain/, all the links are
broken for the same reason.

Which is why I want to use an Access Rule instead and make it a little cleverer.

Which is why I'm trying to find out what methods/variables there are in the
REQUEST object, which doesn't appear to be documented very well ;-)

cheers,

Chris


Oleg Broytmann wrote:
> 
> On Fri, 10 Mar 2000, Chris Withers wrote:
> > If you just drop a SiteRoot in /mydomain then everything works fine through
> > http://www.mydomain.com but http://zope-host.nipltd.com/mydomain/manage just
> > jumps to http://zope-host.nipltd.com/manage. So I'd like to write my own Access
> > Rule to do this.
> 
>    You don't need AccessRule for this - just path correct SiteRootBASE and
> SiteRootPATH environment variables to SiteRoot. Define it differently on
> every server, that's all.
> 
> Oleg.
> ----
>     Oleg Broytmann      Foundation for Effective Policies      phd@phd.russ.ru
>            Programmers don't die, they just GOSUB without RETURN.