Expand my Community achievements bar.

SOLVED

AEM 5 Multiple custom 404 error pages for multiple sites

Avatar

Employee

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

1 Accepted Solution

Avatar

Correct answer by
Employee

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

View solution in original post

2 Replies

Avatar

Level 2

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

Avatar

Correct answer by
Employee

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