Support - Custom Errors
Are you constantly changing your web page? Are you sick of people getting the ugly "page cannot be found" error message? Would you rather a page more similar to your site come up; or even bypass the 404 and have them redirected to your home page?
Once these files are in place, anytime a user requests a page in your domain that the server can't find, the .htaccess file will tell the server to display the redirect.html file which will tell the user how to get to your site. If you have registered pages with search engines that have been subsequently moved or you have changed your site's organization, these steps will insure that no one is left hanging in 404 land as a result.
If your site is hosted on an Microsoft server, visit Windows Custom Errors.
For sites hosted on UNIX servers, you can customize errors yourself. Follow the detailed instructions below.
You might want to print this page now so that you can have it handy while we toss you around from directory to directory — go ahead, print it, we'll wait.
Create the .htaccess file
Open a text editor (Notepad, BBedit), and add the following line:
ErrorDocument 404 /redirect.html
Save the file as .htaccess - that's it ".htaccess" with the dot in front and nothing else.
Create the redirect page
Open that same text editor and create the following file substituting your own Info for the generic references below.
<HTML>
<HEAD>
<TITLE>redirect.html</TITLE>
</HEAD>
<BODY BGCOLOR="white">
<CENTER><H2>Welcome to mywebsite.com</H2>
<P>
The page you were looking for has been moved, deleted, retired - whatever.
<P>
Please click here to go to the top of <a href="/">my Web site</A>.
<P>
Remember to update your bookmarks.
<P>
Thanks for visiting my Web site
</CENTER>
</BODY>
</HTML>
Save it as redirect.html
FTP the files
Open up an FTP program (WSFTP,FETCH) and upload both files to your top-level Web site directory. (e.g., if your site is located in the /home/web/sites/mywebsite directory, you would place it right there at the top level). If you already have an ".htaccess" file in this directory or other subdirectories, you should add the ErrorDocument 404 /redirect.html line to your existing ".htaccess" files.
(note: the this:="" like="" it="" reference="" would="" you="" html="" an="" in="" is="" page="" redirect="" intended="" your="" if="" structure.="" subdirectory="" directory="" within="" located="" file="" the="" where="" of="" regardless="" true="" this="" redirect.html.="" mywebsite.com="" http:="" called="" a="" looking="" and="" replaced="" being="" think=""can="" other="" domain.="" level="" top="" to="" relative="" webserver="" by="" referenced="" redirect.html="")
ErrorDocument 404 /html/redirect.html










