Custom error handler not working for extension less URL
Hi, I'm using AEM version 6.2 and I've override the error handler and created the custom error handler. Inside the custom error handler, added the use of custom ErrorHandler model instead of using OOTB one.
Custom 404.html code:
<html data-sly-use.responseStatus="com.sample.ResponseStatus">
<head>
<title>File not found</title>
</head>
<body>
<p>A custom errorhandler for 404 responses</p>
</body>
</html>
When I hit the URL with resource that doesn't exist in AEM and URL contains .html extension then the control comes in custom 404.html and invokes the model which internally include the 404 error page and displays the result.
But, if I do hit the page without .html extension then it displays error message which is in the custom 404.html.
Not sure if control is actually coming to the custom 404.html 'cos if it comes then it should've invoke the model and displayed 404 page which it displays with .html extension.
Any suggestions?
Regards,
Vijay