[Zope] URL0 returns index_html not index.html

Dieter Maurer dieter at handshake.de
Thu Aug 18 15:46:25 EDT 2005


Mark Barratt wrote at 2005-8-17 17:41 +0100:
>Zope 2.7.4 on Debian
>
>DTML method index_html in the root says <dtml-var "_['index.html']">

Do you know, that this is equivalent to the simpler "<dtml-var index.html>"?

>A link in a page template to
>
>tal:attributes="href string:${context/REQUEST/URL0}/source.html
>
>where the page is addressed by [path]/ and is actually at [path]/index.html
>
>returns [path]/index_html/source.html

Of course:

  The object located by URL traversal is "index_html" and not
  "index.html".

  When rendered, "index_html" happens to return the same text as
  "index,html", but this does not change "URL0".

>I can vaguely see why this is happening. My question: is there a 
>straightforward way of making the links (and error reports) return the 
>actual page address?

The most straight forward way would be to perform
a redirect to "index.html" in your "index_html" -- not the most
efficient way, but one with the least surprises...

-- 
Dieter


More information about the Zope mailing list