To add custom 404 page in aem, Follow following steps :
Go to Apps > Sling > Servlet > errorhandler > 404.html
By default In errorhandler node 404.html and Responsestatus.java files are present. So when ever a page does not exist this 404 page is served to the end user (browser).
You can simply modify 404.html page and can point to 404 component from your apps folder as follows:
<sly data-sly-resource="${'404' @resourceType='/apps/projectname/components/404'}" data-sly-unwrap/>
Go to Apps > Sling > Servlet > errorhandler > 404.html
By default In errorhandler node 404.html and Responsestatus.java files are present. So when ever a page does not exist this 404 page is served to the end user (browser).
You can simply modify 404.html page and can point to 404 component from your apps folder as follows:
<sly data-sly-resource="${'404' @resourceType='/apps/projectname/components/404'}" data-sly-unwrap/>
Sling 404 / errorhandler page |
0 comments:
Post a Comment