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,
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.comwrote:
Concerning Wicket 1.5/6:
I've
Hm, I already thought about that. But I miss the link between the old mounted
pages and the new pages. I mean I have to mount a pair of page classes
though.
mountPage(product.html, LegacyProductPage.class);
mountPage(product/#{product_name}/${product}, ProductPage.class)
And in the new Mapper
You don't need to mountPage(TheLegacyPage) - it wont be used anyway.
The requests to the old urls will be server by the new request
mapper/handler.
On Thu, Jan 17, 2013 at 3:06 PM, Dirk Forchel dirk.forc...@exedio.comwrote:
Hm, I already thought about that. But I miss the link between the old
You don't need to mountPage(TheLegacyPage) - it wont be used anyway.
Yes, you are right. There is actually no need to do this.
But I don't have a glue how to check whether the request URL is an obsolete
one or not AND how to map the old parameters to the new parameters. So I
thought, having
:-)
Read again what you just said - you (the application developer) don't know
the rules but Wicket (a generic framework) should know. How ? :-) Your
manager/customer is not embedded in Wicket to make the decisions :-)
Looking at the urls you showed earlier you have to check that the url ends
Sounds to complicated. Then I prefer the old fashioned way like this ...
Wicket generates the new Url based on a passed in Product. I don't have to
bother about .html ending and segement sizes and so on ...
mountPage(product.html, LegacyProductPage.class);
Hi Dan,
I'd recommend to revert your changes.
Wicket by default uses render strategy which involves http redirects
which has to be temporary. With your change you will always use
permanent redirects and this may cause some problems. For example you
may skip the ACTION phase of the processing and
Hi,
On Mon, May 14, 2012 at 11:56 AM, jarnis jarnis.bertel...@exedio.com wrote:
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
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
Also you can hack jetty or similar...
// Force 302 redirect status code into 301 'permanent redirect'
Field statusField = HttpGenerator.class.getDeclaredField(__status);
statusField.setAccessible(true);
Object[] statusMap = (Object[])
11 matches
Mail list logo