Is there any way to capture the information as to what page was not found when the not found page that is redirected to using the "ErrorDocument 404" statement in the .htaccess file can process PHP?

$_SERVER["REQUEST_URI"] points to the "not found" page and I am trying to find out what page was requested that got redirected there.