| |
Set Up an Error Page
From a user perspective, certainly one of the most annoying aspects of browsing is to encounter the dreaded "404" error. The returned page is virtually useless for most users. A better solution is to create a customized error page.
You can make your custom error page right in MT. To do so you will need to create a new index page in the MT console:
-
Open your MT console and go to the Manage Templates section.
-
Click on the "Create new Index Template" link near the top of the page.
-
Enter an appropriate name for the page, for instance "Error Page" in the Name field.
-
Enter a path to the error page in the Output File field. If you plan to keep the error page in the site root directory (recommended), just enter the name of the page, for instance "error.htm".
-
Enter the description of what occurred to cause the error page to display. Usually this is just a short description to the effect that the page no longer exists or has been moved. I also usually include a link to the site Home Page as well as what ever navigation is available on the Home Page. You can see an example of the metamocha.com error page here.
-
Save the page and rebuild the index files.
Now we need to tell the server what to do with the page we just created. Many hosting services provide a site administration console. If one is available to you, check to see if you can associate the error page you created with the server's "404" error handling service. If you can, follow the instructions given. If not, you can also associate the page manually:
-
Using your FTP program, go to your site's root directory. Look to see if there is a file named ".htaccess". Note: The period at the beginning of the file name indicates that this is a system file so you need to be careful when modifying it.
-
If the file exists, download it. Warning: be sure that the file will be downloaded in ASCII mode. Check your FTP program settings!
-
If the file does not exist, simply create a text file on your local drive.
-
Enter the following line into the file:
ErrorDocument 404 /error.htm
Note that in the case above, the file "error.htm" is located in the site root directory as indicated by the preceeding "/" character.
-
Upload the ".htaccess" file and test it by going to a page on your site that you know does not exist.
Good Blogging!
Comments
Post a comment
|
|
|