|
|
中国企业走向国际需要自己的网站 How to Customize Error Messages for Your Site There are two main styles of error messages you may encounter. The first is the standard form, which looks something like: File Not found The second type comes in a variety of forms, but is customized by the webmaster. For example: Sorry
Such messages are called error documents, and are web pages designed to give a polite explanation for error conditions. These error conditions generate numbers which are used to refer to the appropriate error condition. Some of the most common messages are as follows: Error in Client 400 Bad syntax 401 Unauthorized 402 Not Used (Payment Granted) 403 Forbidden 404 Not Found Error in Server 500 Internal Error 501 Not Implemented 502 Overloaded 503 Gateway Timeout How to Customize Error MessagesFirst, create the HTML page you want to use as your error
message. Next, go into your .htaccess file (or create one) and add
lines which specify the substitution. ErrorDocument 401 http://domain.com/nopasswd.html ErrorDocument 403 /forbidden.html ErrorDocument 404 http://www.domain.com/nofile.html Mime TypesYou can add mime types to your .htaccess file with a line like: AddType text/html .txt
Order | Hosting | Dedicated | Network | References | Support | Contact |