I am working on a CQ 5.6.1 project. I am trying to find how to redirect the 404 error to a custom error page specific to my application. From reading various articles on error handling, I find that the /apps/sling/servlet/errorhandler/404.jsp is the one that handles 404 error. Since there are multiple projects deployed in the CQ, I need to show an error page I create under the project. That is, 404 error from the project1 must be redirected to a custom error page under project1. I was thinking that I should include the redirection code into the /apps/sling/servlet/errorhandler/404.jsp. Is this the right approach or is there a better way to automatically redirect to my projects error page?
1 Answers
1
votes
This is the right approach. You don't have to create such a custom handler manually - ACS AEM Commons already provides a Error Page Handler supporting many sites.