add the code below to the .htaccess file in the joomla installation root directory if you cannot find it.
# CUSTOM ERROR PAGES ErrorDocument 400 URL/error/403.shtml ErrorDocument 401 URL/error/403.shtml ErrorDocument 403 URL/error/403.shtml ErrorDocument 404 URL/error/404.shtml ErrorDocument 500 URL/error/500.shtml # END CUSTOM ERROR PAGES
where url is the url of the site. I appropriately placed the corresponding error files. for internal server error [500], it redirects the 500.shtml file inside the error folder. Shtml is nothing but an html file with a renamed extension.
source share