I tried to get the error "status" like this:
error_page 403 /error.php;
error_page 404 /error.php;
But $_SERVER['REDIRECT_STATUS']
return 200
, already in Apache it returns 404
(the expected result).
How can I define the variables $_SERVER[REDIRECT_STATUS]
, $_SERVER[REDIRECT_REQUEST_METHOD]
and $_SERVER[REDIRECT_URL]
using Nginix?