[Zope] what defines the absolute_url() prefix?

Daryl Tester dt@picknowl.com.au
Thu, 09 Mar 2000 14:53:20 +1030


G'day,

I'm having a blast using (technically: playing with :-) Zope 2.1.4 on
a RedHat 6.1 box, and mod_pcgi2 (1.0.1).  For my first efforts, I've
built a set of DTML methods which emulates www.python.org's style of
website, with an index_html method that "includes" Banner, Sidebar,
Body etc methods, which can be over-ridden in lower-down folders. 
All funky stuff, works well.

In the Sidebar, I have links to folders within the site using
absolute_url() (because of issues with BASE HREF giving me multiple
folder syndrome).  I can access the folder with the URL
http://localhost/cws/Help (and the logfile shows "GET /cws/Help"), but
the absolute_url() method on cws.Help is actually returning
"http://localhost/cws/cws/Help" (which is also accessible - kinda odd,
but not what I want).

I kinda suspect I've screwed the mod_pcgi2 config, mainly because its
the area I'm the most confused about :-)  I have the following config
in Apache:

<Location /zope>
    SetHandler pcgi-handler
    PCGI_ROOT /
    PCGI_SetEnv SiteRootPATH /
</Location>

<Location /cws>
    SetHandler pcgi-handler
    PCGI_ROOT /cws
    PCGI_SetEnv SiteRootPATH /cws
</Location>

(Oh, and I've just added a <dtml-var REQUEST> to the Help page, and
it's returning URL http://localhost/cws/cws/Help/index_html for
accesses to http://localhost/cws/Help, so it's awfully consistent
in its behaviour.

How does zope determine what the prefix is, and better yet, how do I
fix it to mesh with reality?


Regards,
  Daryl Tester