choose a product: |
Getting Started with CustomError CustomError's power is in its simplicity. The software's Error Directory is a directory at the root of each site (or any directory of the site, see Directory Tab) into which site developers can place their customized error pages. The name of the directory is configured at installation time, but may also be changed for each site at any time. When an HTTP error response is generated by the Web server, CustomError looks in the Error Directory and retrieves the appropriate error page. Error pages are named according to the following convention: Error-Code Dot File-Extension For example, 403.htm or 403.html, 404.htm or 404.html, 500.htm or 500.html. Dynamic files like ASP can also be configured to deliver 404 error pages with CustomError.CustomError may also be configured to send an image file instead of an HTML file. For example, if the following request generates a 404 error: /images/some-image.gif/errors/404.gif rather than /errors/404.html.The tool also provides a mechanism to manage file redirection from one convenient rules file - a nice alternative to remembering redirections in an ad hoc-fashion. Given the importance of managing dead or moved links to search engine optimization, this feature is very useful. CustomError has full error logging features, as well as an integrated error log file viewer. Installation Installing CustomError is very simple. Once you have downloaded the installer executable from the Port80 Software Web site, double click on the file to begin the CustomError setup program. The CustomError setup program will guide you through the steps necessary to complete the installation. You will be asked to accept the license agreement and to choose an installation destination. The default installation location is C:\Program Files\Port80\CustomError. Files Installed by CustomError CustomError installs the following files in the following default locations: In C:\%SystemRoot%\System32\inetsrv\
Using the Settings Manager The CustomError Settings Manager can be launched from the Port80/CustomError program group in the Start menu, or directly by running CustomError.exe. The Settings Manager controls the operation of CustomError for any Web site (virtual server) provisioned on the computer. On the left side of the Settings Manager is a list of all the Web Sites (virtual servers) that are available on the computer. Use this list to select the Web site whose settings you want to change. ![]()
Error Directory Tab ![]() Error Directory Name The name of the directory in which error files are to be placed. The default directory name is "errors". Error Directory Search Mode This setting determines how to find the Error Directory. Selecting "Check Site Root..." means that CustomError will only look for the Error Directory in the root of the Web site. For example, if C:\www\site1 was the root of the Web site and the CustomError directory was configured to be "MyErrors", then CustomError would look in C:\www\site1\MyErrors for the appropriate Error File.Selecting "Check Requested Directory..." means that CustomError will begin searching for the Error Directory within the same directory as the requested file, and then look to the next highest level directory in the request URL, and so on, until an Error Directory is found. Regardless of which method is selected, if an appropriately-named Error Directory or an appropriately-named Error File are not found, the error is simply handled by Microsoft IIS as if CustomError were not present. Error Files Tab ![]() Static Error PagesThis file extension list configures the order in which CustomError searches for the Error File. The default order is (1) .htm, (2) .html. For example, if a 405 error occurs, CustomError would look for 405.htm, then if that file does not exist, proceed to look for 405.html. Enable Dynamic 404 PagesThis setting enables CustomError to allow dynamic error pages for 404 errors. The file extension list associated with this setting configures the order in which CustomError searches for the Error File. The default order is (1) .asp, (2) .aspx. For example, if this setting is enabled and a 404 error occurs, CustomError would look for 404.asp, and then if that file does not exist, proceed to look for 404.aspx. Enable 404 ImagesThis setting enables CustomError to send an error image rather than an HTML file when a 404 error occurs. CustomError determines when to send an error image by the Request Wildcards tab. If the request that causes a 404 error matches any of these wildcards, then CustomError will send an error image (if one exists). For example, the first default wildcard is "/images/*". This means that any request (resulting in a 404) whose path starts with /images/ will be considered an image request. The file extension list on the File Extension tab, configures the order in which CustomError looks for an error image with the specified file extension. The file extension of the error image does not need to be the same as the file extension of the requested image. Redirection Rules Tab ![]() A unique feature of CustomError is its centrally located, rule-based redirection file, rules.ce, which should be located at the root of the Web site. The file can contain simple rules that CustomError will use to send a redirection response (rather than the usual HTML response) when a 404 error occurs. The syntax is simple: Request-Wildcard Tab Redirection-URL [Tab Redirection-Type]/products/mypage.htm/products/mypage.htm. However, if the Request-Wildcard was: */mypage.htm /mypage.htmThe Redirection-URL is the URL that CustomError will put in the Location: header of the redirection response. You can enter the fully qualified URL (i.e. http://www.port80software.com/products/index.htm) or just the path portion (i.e. /products/index.htm). The rules file also allows for special variables to be used in the Redirection-URL, which CustomError will replace with the actual values. $U - The full request URL, including the query string.$P - The path portion of the request URL.$Q - The query string portion of the request URL.$R - The contents of the HTTP Referer header from the original request.For example:
The Redirection-Type determines the type of HTTP redirect used in the error response and is optional. The possible values are: "302" or "temp" for a temporary redirect ("302 Found", see RFC 2616)."301" or "perm" for a permanent redirect ("301 Moved Permanently", see RFC 2616).Note: Please use caution with this feature. If you had the following rule set up: /some-file.htm /some-file.htm /some-file.htm generated an error, you would have infinite redirection because CustomError would redirect to a file that would cause another error. Logging Tab ![]() This tab allows you to enable logging for CustomError. When enabled, CustomError will log information about requests in which it acts upon. The log files are created in the directory specified. If you enter [SITE] into the path when you have "Default Settings" or multiple sites selected, the Settings Manager will automatically insert the Microsoft IIS virtual server site number into the path. For example, if you were to select "All Web Sites" and enter C:\Logs\CustomError\W3SVC[SITE]\ C:\Logs\CustomError\W3SVC1\Log Viewer ![]() The CustomError Log Viewer is a utility to easily view the CustomError log files. Use the "Virtual Server List" to choose a Web site whose log files you would like to view. Once you have chosen a Web site, use the "Log Files" list to choose a log file to view. System Requirements CustomError is compatible with the following:
* Since Windows XP lacks a true "server" configuration, Port80 Software neither recommends nor supports the use of its software on Windows XP (and the associated version of IIS) in production environments. The Windows XP environment is supported exclusively as an evaluation platform. |
| |||||