I want to handle the error scenarios from WebServer(Apache) instead of AEM sling error handler as I wanted error pages to get cached in the dispatcher
when I let apache handle the errors i followed 2 steps
step1:
added the below code to a .conf file and added that to the individual vhost
how can I achieve the below:
non-existent-page.html does not exist, and the user is trying to access that page and triggered a 404 error.
Can I show the requested page URL: http://www.example.com/non-existent-page.html
instead it is redirecting to the error page URL:http://www.example.com/errors/404.html
Views
Replies
Total Likes
@chandanaa9 I was also having this issue last week and got resolved after setting below configurations
DispatcherUseProcessedURL On
DispatcherPassError 1
Follow below link for more details
For showing same url instead for redirection you can also use ACS Commons 404 error page handling
https://adobe-consulting-services.github.io/acs-aem-commons/features/error-handler/index.html
i have already did all this , the problem i trying tio solve is that it is getting redirected to error page instead of staying on the existing URL
Views
Replies
Total Likes
HI @chandanaa9
You can check the following vhosts file
<LocationMatch />
ErrorDocument 404 /content/aemlab/oneweb/errorpages/404.html
ErrorDocument 403 /content/aemlab/oneweb/errorpages/403.html
ErrorDocument 500 /content/aemlab/oneweb/errorpages/500.html
</LocationMatch>
<IfModule disp_apache2.c>
# Enabled to allow rewrites to take affect and not be ignored by the dispatcher module
DispatcherUseProcessedURL On
# Default setting to allow all errors to come from the aem instance
DispatcherPassError 1
</IfModule>
Views
Likes
Replies