| create a custom 404 error documentcreate your own custom 404 error document, it's as easy as 1 2 3, create a 404.html, create a text file called .htaccess and upload to your server, read on ...
If your website is on a server that allows you to have your own dot.com domain name you can create your own custom 404 error documents This is done by creating or modifying the .htaccess file in your root directory.
step 1 to creating a custom 404 error document is to create a .htaccess file
to do this open your text editor, notepad is best and add this line of text
ErrorDocument 404 /404.html
or you could use a full url
ErrorDocument 404 http://www.someserver.com/404.html
 Notepad
|
File Edit Search Help
|
ErrorDocument 404 /404.html
|
now save the file as ".htaccess"
important: note the double quotes around ".htaccess"
to view your .htaccess file, doubleclick on it and windows will ask what you want to open it with, select 'notepad' from the menu
step 2 to creating a custom 404 error document is to create the 404.html page, you can make your custom 404 error document anything you want, around the web you will find custom 404 error documents that simply have a link to the website homepage to custom 404 error pages that have search engines or even games on them
step 3 to creating a custom 404 error document is to upload the ".htaccess" file and the custom 404 error page (404.html) to your server
other common error codes
http error codes
Web server error messages have standard associated numbers
("http response codes"), for example the familiar 404 error message meaning "File not found" or the classic 403 error: Forbidden
The most common error messages are: 403, 404, and 500
lets look at one error at a time.
Error 403
this is most often encountered when the index.html of a folder is missing or the owner of the site has turned off permissions for either that page or its parent directory. If you get this error message and really want to see the page, you could try and contact the owner of the site and tell them what URL you were trying to access when you got the 403 error.
Permissions get changed as much by accident as on purpose, the author might appreciate knowing.
Error 404
This means that the URL as you've typed it doesn't exist.
Check the spelling and try again, but be aware that people take pages down all the time on the
Internet. If you're pretty sure that the page is there, try and contact the owner of the site about the 404 error you got.
error 500
This means that there was a cgi script running that didn't work correctly, you can't fix it, and you can't move past it
you could try and contact the owner of the site.
create your own custom 403, 404 and 500 error documents then update your ".htaccess" file
heres an example ...
 Notepad
|
File Edit Search Help
|
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html
ErrorDocument 500 /500.html
|
other http error codes:
100 Continue
101 Switching Protocols
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
300 Multiple Choices
301 Moved Permanently
302 Moved Temporarily
303 See Other
304 Not Modified
305 Use Proxy
400 Bad Request
401 Unauthorized (directory is protected by a password)
402 Payment Required
403 forbidden (all visitors are barred from looking at this file or directory)
404 file not found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Time-Out
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Request Entity Too Large
414 Request-URI Too Large
415 Unsupported Media Type
500 internal server error (cgi script error)
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Time-Out
505 HTTP Version Not Supported
«
back to tips & tricks arhive
|
|