I am trying to achieve including error documents into the invalid url instead of redirecting the user to the error document's url.
When I go to an invalid url e.g www.example.com/invalid.php I get redirected to www.example.com/404.html (because thats how I have set up my apache2.4 settings)
What I am trying to achieve is something like when you go to www.google.com/invalid/invalid.php (invalid url) the url maintains the same, but the error document is included "silently".
How can I achieve something like this?
I am on Ubuntu 15.10 Apache2 PHP7.1
current error doc redirects in htaccess
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html
ErrorDocument 500 /500.html