There is no such functionality in Wicket.
But all you need is a custom IRequestMapper, override its #mapRequest(Url)
method and return a custom IRequestHandler that does the redirect.


On Thu, Jan 17, 2013 at 2:22 PM, Dirk Forchel <dirk.forc...@exedio.com>wrote:

> Concerning Wicket 1.5/6:
>
> I've mounted a page for example with a mount path like "product.html" and
> with a query string (PageParameter) like "product.html?product=1234". This
> is my old mounting path which has already been indexed by Google.
> The new mounting path for the same page will look different, say
> "product/product-name/1234".
> To forward requests from obsolete links to the new one, I've added a kind
> of
> "Redirect Page" which does nothing but redirecting to the new Url. The
> redirect page is mounted with the old path.
>
> public RedirectPage( final PageParameters parameters, final String url )
> {
>         super(parameters);
>         throw new RedirectToUrlException( url ,
> HttpServletResponse.SC_MOVED_PERMANENTLY );
> }
>
> If I would change the mounting path for more than 5 or 10 pages, this kind
> of solution could be very annoying.
> Is there another way to solve this. I would prefer something like a Map
> which holds old and new mounth paths and a kind of "Mapper" which is
> responsible to map obsolete URLs to new ones.
> Exists such a solution which I'm not aware of?
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4655460.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to