Hi,
Thanks for your valuable help. I was informed very well due to your replies.
I found another approach to get the URL of the missing page. It is the client side approach. i.e JavaScript.
Using [FONT=Lucida Console]document.location[/FONT], will give the location of the page, since, apache does not lead to change the missing page URL from the browser's address bar.
A text file is attached named e404.txt show what I have done. To test it, please change its extension to .php