Are you using Apache HTTPD in front of your app server?  If so, you can just 
use a Rewrite Rule to send the 301 redirect with the new URL.  You may want to 
look into your app server to see if url rewriting is an option.



-----Original Message-----
From: jarnis [mailto:jarnis.bertel...@exedio.com] 
Sent: Monday, May 14, 2012 5:56 AM
To: users@wicket.apache.org
Subject: Redirect to Wicket page with 301 Moved Permanently

Hey guys

I'm trying to make a redirect form an old url to a new one. The browser url 
should be changed to the new one and the response code for the original request 
to the old url should be 301 Moved permanently so search engines will forget 
the old url.

Making the redirect by throwing a RestartResponseException works fine, except I 
can't change the response code from 302 Moved Temporarily to 301 Moved 
Permanetly

I've also tried using the RedirectToUrlException, where setting the response 
code is easy, but I have problems getting it to construct a correct relative 
url so I don't have to hard code it to a specific host name.

What is the best way to solve this?

Thanks in advance

Jarnis

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888.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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to