this is such an easy mod but can finish your site off.
what is a 404 error page?
The 404 or Not Found error message is a HTTP standard response code indicating that the client was able to communicate with the server, but the server could not find what was requested. 404 errors should not be confused with "server not found" or similar errors, in which a connection to the destination server could not be made at all. A 404 error indicates that the requested resource may be available again in the future.
all hosting companys give you one but most of the time they are filled with ads and dont look anything like your site.
so how do we make one?
its very easy we are going to need to edit 2 files
first off you need to edit your .htaccess file which is in the root of your domain on your server
add this to your .htaccess file
Please not the notfound.html URl is the url to the page that will be showen when a 404 error happens. you can change this to what ever you want.Code:ErrorDocument 404 /notfound.html
next we need to make the page that will be showen (save as notfound.html or what ever you wish to name it as long as its the same as what is in your .htaccess file)
upload to server and you are doneCode:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <p>404 error </p> <p>sorrie page not found </p> </body> </html>
to see it working try and visit a url you know dose not exisit on your server


LinkBack URL
About LinkBacks




Reply With Quote
Bookmarks