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:
instead of the error page URL:
While looking at
Stephen Ostermiller's answer i knew i was using a relative URL, but i realized it had a missing trailing slash at the end because i was pointing to a directory and not a page. This mostly occurs with some xSP with bad configurations.
ErrorDocument 404 /error/404 <-- no slash
ErrorDocument 404 /error/404/ <-- added slash