AEM Dispatcher ErrorDocument URL not showing up
Hi AEM Community,
I have the below Error Document vhost configuration written for my site -
ErrorDocument 404 /content/xyz/us/en/errors/404.html
When I am hitting an incorrect URL my dispatcher logs show the below -
172.17.0.1 "localhost" - [05/Aug/2022:07:16:25 +0000] "GET /content/xyz/us/en/abc.html HTTP/1.1" 301 233 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0"
172.17.0.1 "localhost" - [05/Aug/2022:07:16:25 +0000] "GET /abc.html HTTP/1.1" 404 2425 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0"
[05/Aug/2022:07:16:25 +0000] "GET /content/xyz/us/en/abc.html HTTP/1.1" 404 none [publishfarm/0] 13ms "localhost"
The above entries are due to the below redirect rules -
RewriteRule ^/content/xyz/us/en/(.*)$ /$1 [NE,L,R=301]
RewriteRule ^/(.*)$ /content/xyz/us/en/$1 [NC,PT,L]
However, once the redirection occurs and 404 was encountered I was expecting the logs to redirect to error page as defined in ErrorDocument directive.
Can anyone please suggest what is wrong in this ?
Currently the request passes to publish and is served with the below -



