A cool trick you can entice your visitors with is custom error pages. When a page on your server is not found, your visitors will normally see their browser's default message such as "Page cannot be displayed." If you used a custom error page though, your visitors will see your page.
404 Error pages will ONLY work if you are using it on a domain. Sub-domains (something.your-site.com or
http://www.your-site.com/something) will NOT work.
Here's How:
1. Create an HTML file for your 404 page. It could be anything you would like. It could be just simply 404 on a blank page.. or it could be your layout that includes the 404 words in it.. it's all up to you.
2. Save that file in any file format you want (html, php etc;) and upload it to your webserver. You can either keep it in your main or root directory, or you can create a subfolder. If you're only going to be using one (404) then I suggest just leaving it in your root folder.
3. Press start > Run > type "notepad" (in mac, just open a text editor) now you will take this code below, and put it into your text editor:
CODE
ErrorDocument 404 http://www.yoursite.com/404.htm
4. Remember, change the URL in the above code to the path of your 404 page on your server.
5. Now file > save as > htaccess.txt | save it somewhere that you will remember.
6. Upload the
htaccess.txt folder to your webserver. (Make sure it's in the home or root directory)
7. Rename the file (will be different for different ftp clients) to
.htaccess (make sure there is a "." before htaccess and NO ".txt" after htaccess)
8. And there you go! You should be good to go. There are also other error pages available such as internal error, forbidden etc; search google for these .. and then its just a matter of adding that code to your .htaccess file and making another error document (like your 404 page).
Any questions?
Jacob.
is there any way to have the error page display the missing page that users can reference when sending an email?
example.. the bad link generates the error page and documents the missing page so admin can be emailed.
thanks in advance for any help offered.