[opencms-dev] Custom 404 pages on a per-site basis...

Nigel Kersten nigel at cofa.unsw.edu.au
Mon Jul 3 23:56:55 CEST 2006


So in the end I did something like this:

---- standard handle404.html page---------
<%
  CmsJspStatusBean cms = new CmsJspStatusBean(pageContext, request,  
response, exception);
  response.sendRedirect("/errors/404.html?request=" +  
cms.getRequestUri().replaceFirst("/opencms", ""));
%>

and then my /errors/404.html page parses out the requested uri, and  
provides a search field for each item split by the path separator.

like this:

http://new.cofa.unsw.edu.au/test/some/other/page



More information about the opencms-dev mailing list