cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject Re: Standardizing Redirect in Cocoon
Date Sat, 14 Apr 2001 21:36:39 GMT
On Fri, 13 Apr 2001, Berin Loritsch wrote:

> > > and if the "context:" protocol is specified, then the URL should be
> > > relative to the context root.  This should be easy in Cocoon 2, because
> > > we are limiting the access to the redirect function--I don't know about
> > > Cocoon 1.
> >
> > Can you explain a bit in detail?
> Basically something like this:
> Current URI:     "http://localhost/cocoon/foo/bar/index.html"
> Current context: "cocoon"
> Redirect-to: "/index.html"      maps to "http://localhost/index.html"
> Redirect-to: "../index.html"    maps to "http://localhost/cocoon/foo/index.html"
> Redirect-to: "context://index.html" maps to "http://localhost/cocoon/index.html"
> If the context is moved to "margaritaville/parrothead"
> then the context urls won't have to be changed
> ("http://localhost/margaritaville/parrothead/index.html")
> to go to the new location.
> Absolute urls like "/cocoon/index.html" won't work in that case, they
> would have to be changed in the code.

+1. i was also thinking about how to link to c2 resources as well. fer
instance, suppose i have an image located at


in a webapp mounted at 'foo'. the only way i can reliably link to that
image across all of the pages in my webapp is to link to


i'd think it would be pretty cool to have a filter which would check for
context urls in certain HTML elements (a:href, img:src, etc.) and
translate context: urls appropriately. anyone else think this would be

- donald

To unsubscribe, e-mail:
For additional commands, email:

View raw message