PHP : How to make my own 404 page not found error [duplicate]

Possible Duplicate:
How can I create an error 404 in PHP?

how to make my own 404 page not found error in my site so it looks better than the default
when someone accesses url like this www.blablabla.com/index99.php which is doesn't exist this will automatically redirected to my own 404 page thank beforehand


  1. Make your own custom 404 page
  2. Make an .htaccess file and place it in your root
  3. Place this line inside the .htaccess file ErrorDocument 404 http://www.example.com/your-custom-404.php

Read more here