<https://forums.cpanel.net/threads/custom-php-error-pages-without-redirection.493601/>
<http://schema.org/articleBody>
"Hi cPanel Forums,\n\nI have a little problem/question at the moment with custom error pages that I would like to fix/get resolved.\n\n1) Let's say we are visiting: website.com/dashboard/\n2) It loads correctly and you see the page.\n3) You press F5 and suddenly are met with cpanel/apache's default error 500, which is a white page with the text server error 500 (i think)\n4) Look at the URL, it still says website.com/dashboard/ yet it is showing the error page WITHOUT redirecting.\n\nNow, if we go and set a custom error page it does NOT let us include PHP so the only option I am aware of is to redirect to a PHP page with something like OR set the ErrorDocument line in .htaccess:\n\n<script language=\"javascript\">\n    window.location.href = \"https://www.website.com/500.php\"\n</script>\n<meta http-equiv=\"refresh\" content=\"0;url=https://www.website.com/500.php\">\n\n\nNow, any custom error page or a error page that redirects to a PHP page will work but it will not allow us to press F5  because when we refresh website.com/dashboard/ it redirects to website.com/500.php so refreshing will just keep refreshing the error page.\n\nI know you could say put a link on the custom error page to \"refresh/retry\" using javascript:history.go(-1) but that doesn't solve the problem, I still can't use refresh/retry the URL.\n\nHow can I stop it from redirecting but still show the custom error page?"
<https://forums.cpanel.net/threads/custom-php-error-pages-without-redirection.493601/>