[Zope] Zope URLS

Chris Withers chrisw@nipltd.com
Thu, 08 Jun 2000 11:59:28 +0100


Rik Hoekstra wrote:
> so what is the use of the /? Couldn't all Zope URLs end without a /?

I'm afraid this is the whole problem and it's caused by relative urls.

Say you're at http://host/x/y where y is a container that renders
index_html to be displayed, and in that index_html you haev a ref:

<a href="b">b</a>

Now what you mean by that is http://host/x/y/b but because there's no /
on the end, you actually get http://host/x/b

How Zope handles this is by sticking in that godawful base tag:
<base href="http://hosy/x/y/">
which makes relative URLs work properly.

BUT, from what Gregor said earlier is a 'non-standard' way of doing it:
> traditionally in a static web server, if you try
> to access a URL like 'http://host/xyz' (without trailing slash), the server
> will return you an error '301 Moved permanently' and will point you to the
> new location 'http://host/xyz/

which is why I suggested all Zope URLs should end in / as all zope
objects can be containers in the 'traditional' sense.

Or we could just re-write HTTP to provide more useful information in the
first place ;-)

cheers,

Chris