RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
If you do not have the file called .htaccess, you will need to create a new text file and save it as ".htaccess".
If you are creating the file from scratch, simply type the following line into the file, changing the url to the location of your custom page:
Code:ErrorDocument 404 [URL]http://www.yoursite.com/custom_page.html[/URL]