You can create custom error pages on Apache web servers for specific sub-directories or sub-domains by creating a .htaccess file in the directory and adding this:
ErrorDocument 404 /errordocs/not_found.html
The path obviously needs to go to an “error” directory that you create in the sub web area.