cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject Re: sub-sitemap and redirect
Date Tue, 29 May 2001 19:19:12 GMT
On Tue, 29 May 2001, Sven Kuenzler wrote:

> In the main sitemap, I have mounted a sub-sitemap like:
>
>   <map:pipeline>
>    <map:match pattern="sub**">
>     <map:mount uri-prefix="sub" src="sub/" check-reload="yes"/>
>    </map:match>
>   </map:pipeline>
>
> In the sub-sitemap, there is this entry
>
>    <map:match pattern="">
>     <map:redirect-to uri="sub/foobar"/>
>    </map:match>
>
> Now, if I request /cocoon/sub, I get redirected to /cocoon/sub/foobar,
> which is what I want.
> However, if I request /cocoon/sub/, I get redirected
> /cocoon/sub/sub/foobar, which is not found.
>
> Is this the desired behaviour? If so, how should I correct my pipelines
> to get the same result from requesting with or without trailing slash?

Thanks for the hint. The pattern of the matchers to the mount element
should be "sub/**". In the sub-sitemap a redirect should not include the
url prefix of the sub sitemap else you cannot relocate the sub sitemap
to another url prefix without changing all the patterns in there..

Giacomo


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message