cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Upayavira" ...@upaya.co.uk>
Subject Re: Redirecting
Date Tue, 08 Apr 2003 11:49:45 GMT
> I want to set a simple redirect in my Application, but I can't get it!
> My goal is to write the main url of the application as:
> 
> http://localhost:8080/cocoon/myApp
> 
> while now I have:  http://localhost:8080/cocoon/myApp/index
> 
> It's a simple question with a simple answer, as I read on the Wiki, so
> I don't know why it doesn't works. My sitemap is this:
> 
> <map:pipelines>
> <map:pipeline>
>     <map:match pattern="">
>         <map:redirect-to resource="index"/>
>     </map:match>
> 
> <map:match pattern="index">
>     <map:generate src="index-page.xml"/>
>     ...
> </map:match>
> 
> ....
> 
> I tried also to write the tag <map:redirect-to uri="index"/> with the
> same result.
> 
> If I try these requests:
> http://localhost:8080/cocoon/myApp I get a "Resource not found" error.
> (Of course the resource exists!) http://localhost:8080/cocoon/myApp/ I
> get the directory listing.

The redirect you have will allow you to use the URL:

http://localhost:8080/cocoon/myApp/
not
http://localhost:8080/cocoon/myApp

If you want the latter, you should put a redirect in your root sitemap, such as

<map:match pattern="myApp">
  <redirect-to uri="myApp/index"/>
</map:match>

which will be alongside your mount:
<map:match pattern="myApp/**">
  <map:mount src="...." ....../>
</map:match>

Hope that makes sense.

Regards, Upayavira


---------------------------------------------------------------------
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