How to catch all 404s (Page Not Found) and reroute to a Page or strategy

View: New views
2 Messages — Rating Filter:   Alert me  

How to catch all 404s (Page Not Found) and reroute to a Page or strategy

by Chris Lintz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,
I want to catch all page not found (404s) and simply grab the path that caused the 404 and reroute the request to a valid Page based on business rules (returning a valid 200), or simply continue to return the 404.  I dont see where i can intercept these errors easily from the Application.  

Another option that would be cool (but is not implemented) would be to have mounted path that is a catch all defined by a regular expression so I could catch everything off root that wasn't found by any other mapping.

Any ideas?

Thanks in advance.

chris

Re: How to catch all 404s (Page Not Found) and reroute to a Page or strategy

by Thomas Singer-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Please see my thread with a similar problem:

http://www.nabble.com/Slighly-OT%3A-error-page-in-Tomcat-with-Wicket-to18231002.html

--
Cheers,
Tom


Chris Lintz wrote:

> Hi all,
> I want to catch all page not found (404s) and simply grab the path that
> caused the 404 and reroute the request to a valid Page based on business
> rules (returning a valid 200), or simply continue to return the 404.  I dont
> see where i can intercept these errors easily from the Application.  
>
> Another option that would be cool (but is not implemented) would be to have
> mounted path that is a catch all defined by a regular expression so I could
> catch everything off root that wasn't found by any other mapping.
>
> Any ideas?
>
> Thanks in advance.
>
> chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

LightInTheBox - Buy quality products at wholesale price