i wish to know where the 404 page redirection happened?.Because i have to redirect to custom.php rather 404 page.

is possible?..if it's where will i alter the code?.

Thanks Ravi

The simplest way is always to substitute the mistake page (which in wordpress is known as 404.php) because of your own. Just visit the folder where your theme is saved, and you'll find there the 404.php (whether it does not exist, not a problem). Relabel your custom.php to 404.php and set it inside your theme's folder, and you ought to get it.

Read more details in this article at wodpress.org about creating an Error 404 Page