cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject Re: [c2] simple question on map:redirect-to semantics
Date Fri, 18 May 2001 09:39:20 GMT


On Thu, 17 May 2001, Donald Ball wrote:

> assume my c2 webapp is mounted under '/webapp'. when i redirect to a
> relative uri:
>
> <map:match pattern="foo/bar">
>   <map:redirect-to uri="bat"/>
> </map:match>
>
> i end up at '/webapp/foo/bat', as one might expect. when i redirect to a
> site-absolute uri:
>
> <map:match pattern="foo/bar">
>   <map:redirect-to uri="/bat"/>
> </map:match>
>
> i end up at '/bat'. maybe that's desirable behavior, maybe it's not, but
> that's beside the point. my goal is to redirect the url to
> '/webapp/bat' without having to put the '/webapp' string inside the uri. i
> would think that you could do it like so:
>
> <map:match pattern="foo/bar">
>   <map:redirect-to uri="context://bat"/>
> </map:match>
>
> but that gives me an IllegalArgumentException. any suggestions?

Have you tried using

 <map:match pattern="foo/bar">
   <map:redirect-to uri="../bat"/>
 </map:match>

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message