Answer the question
In order to leave comments, you need to log in
Custom error page 400,401,403,404 etc?
I make a redirect, I registered in .htaccess
ErrorDocument 400 http://mysite.ru/error.php?error=400
ErrorDocument 401 http://mysite.ru/error.php?error=401
ErrorDocument 403 http://mysite.ru/error.php?error=403
ErrorDocument 404 http://mysite.ru/error.php?error=404
ErrorDocument 500 http://mysite.ru/error.php?error=500
ErrorDocument 503 http://mysite.ru/error.php?error=503
switch($_GET['error']) {
case 404:
header("HTTP/1.1 404 Not Found");
break;
} //и т.д
Answer the question
In order to leave comments, you need to log in
Apache will first give the redirect header
httpd.apache.org/docs/2.2/mod/core.html#errordocument
and then you need to give yours in the code
50x errors will not be handled in a mess! 503 for example, nginx returns when the puff daemon is turned off (or has fallen). In this case, how can the handler process the code if it is turned off?
IMHO is better without GET, for example,
and there is a separate view under it or whatever you have
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question