here is how I did it.
add a template fragment , I called mine
87ErrorDocument
but probably should rather be 87ErrorRedirect but the name doesn't matter. the number places it in the correct sequence in
the generated httpd.conf file after several tries this one worked but is probably not optimal as it is global to the entire machine - ie: all websites will look in thier root for the error document.
then put
ErrorDocument 404 /error.php
where /error.php is the path and file you want them to see on a 404 error. You can use what ever file you want. The example is based on what I did not what you, exactly need to do.
I haven't got around to another idea that I have seen
and that is to put a argument on the end like
ErrorDocument 401 /error.php?error=401
ErrorDocument 403 /error.php?error=403
ErrorDocument 404 /error.php?error=404
ErrorDocument 500 /error.php?error=500
etc ...
that way you can have one file with the proper logic in it to
return the error messages the way you want for all the errors.