Hi Jon

On 20 Feb 2004, at 5:35, Jon Evans wrote:

> I have the following matcher (lines split to prevent wrapping):

> <!-- Handle app?id=123 by redirecting to a
>      bookmark URL which does the right thing -->
>    <map:match pattern="app">
>      <map:redirect-to uri="bookmark?top=0&amp;leftnav-home=0
>        &amp;home-apps=1
>        &amp;app1={request-param:id}
>        &amp;app2={request-param:id}"/>
>    </map:match>

> This works great, except the user now has to wait for 2 redirects. 
> First they are redirected to the bookmark URL, then the bookmark URL 
> redirects them to the portal URL.

> Is there any way to make it so that the app?id=123 URL returns the page 
> without needing the redirects?

I've found that by using the cocoon:// "Internal" protocol, the redirect 
takes place internally and 
not on the client side.  You might try:

<!-- Handle app?id=123 by redirecting to a
     bookmark URL which does the right thing -->
   <map:match pattern="app">
     <map:redirect-to uri="cocoon://bookmark?top=0&amp;leftnav-home=0
       &amp;home-apps=1
       &amp;app1={request-param:id}
       &amp;app2={request-param:id}"/>
   </map:match>

I don't have any references that explicitly state this, but it is the 
behavior I get.

Please note:
http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html#Protocols

cocoon:// takes from the root sitemap.
cocoon:/ takes from the current sitemap.

HTH!

Thanks!
David Day

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to