AEM 5 Multiple custom 404 error pages for multiple sites | Community
Skip to main content
Community_Admin
Adobe Employee
Adobe Employee
October 16, 2015
Solved

AEM 5 Multiple custom 404 error pages for multiple sites

  • October 16, 2015
  • 2 replies
  • 4142 views

HI,

 

I have multiple sites, and I would like to set up a different 404 page for each of my sites

 

Someone already faced this problem? How I can accomplish this?

 

Or there is a way to do via the dispatcher and create a static 404 error HTML page each time I publish a site?

 

 

Thank You

 

 

Adolfo

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Community_Admin

Adolfo,

 

You might have to add that logic under your custom 404.jsp and depending upon Host name you can call different logic or script. Hope that make sense.

 

Yogesh

2 replies

Level 2
October 16, 2015

Checkout the ACS AEM Commons Error Page Handler [1] .. its a robust mechanism that allows for Authors (or site owners) to define authorable Error pages in AEM 5 with just "normal" CQ pages.

You can also checkout the source code on the GitHub Project to see how its built out and/or get inspired on how to roll your own (if you dont want to the use the Commons variant for whatever reason).

[1] http://adobe-consulting-services.github.io/acs-aem-commons/features/errorpagehandler.html

Community_Admin
Adobe Employee
Community_AdminAdobe EmployeeAuthorAccepted solution
Adobe Employee
October 16, 2015

Adolfo,

 

You might have to add that logic under your custom 404.jsp and depending upon Host name you can call different logic or script. Hope that make sense.

 

Yogesh