当前位置: 首页 > 网络学院 > 设计教程 > 设计理念 > 挽回网站流失的访问者

设计理念
利用.htaccess控制网站
别具一格的网站评论
网站设计原理

设计理念 中的 挽回网站流失的访问者


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 1502 ::
收藏到网摘: n/a

If you spend any time surfing the Internet, you've probably encountered a few error messages.

在网上浏览时,你可会发现一些错误信息。

Error messages have numerous causes, such as misspellings, outdated links or internal server errors. When an error is encountered, your server will display specific generic error pages according to the error. These error pages are not only dead ends, but they are also very frustrating for your potential visitors.

引发错误信息的原因有很多,比如:拼写错误、过期链接或者内部服务器错误。出现错误时,服务器会根据错误代码呈现错误网页。错误网页不仅不能进行链接,还会让网站流失潜在访问者。

When your visitors mistype your web address or click on an outdated link and receive the dreaded error page, they'll most-likely click on their back button and never return. However, you can recover a majority of your lost visitors simply by taking the time to create some customized, user friendly error pages.

当访问者键入错误的网站地址或者点击过期链接,打开错误网页时,它们会点击后退键,以后再也不会登录网站。然而,通过创建操作性强的错误网页,你可以挽回大部分流失的访问者。

As servers run different types of software and do not function in the same manner, there isn't a simple method for creating custom error pages that will work with every system. However, if you have your own domain and your site is hosted on a Unix/Linux server running Apache, this article will assist you in creating custom error pages.

由于服务器管理不同类型的软件,在同一种方法下不会发挥功能,所以没有出现一种简单方法,能创造出应付各种系统的错误页面。然而,如果你有域名,并且网站的服务器为UnixLinux,这篇文章会帮助你创建实用的错误页面。

If you're not sure what type of server you're on, visit the following web address to find out: Uptime.netcraft.com

如果不清楚网站服务器的类型,你可以登录Uptime.netcraft.com,查找服务器类型。

Before we begin, keep in mind, editing your server files is serious business. Even one small typographical error can wreak havoc -- make sure you make a backup copy of any file you're planning to edit.

在开始之前,首先记住:编辑服务器文件很重要。一个小的排字错误就会产生很大的影响,在编辑之前,对每个文件都要进行备份。

Guidelines for creating your error pages:
创建错误页面的建议:

1. Create your error pages in standard HTML -- just as you would create any other web page for your site.

1.
运用标准HTML语言创建错误页面——方法如同创建其它网站页面。

2. Don't alarm your visitors. Never include the word "ERROR" in large, bold text. Your visitors may immediately become alarmed and think they've done something to cause the error. Instead, be apologetic and encourage your visitors to click on the navigational links to locate additional resources and information.

2.
不要给访问者发出警告,网页中避免出现大的、粗体的"ERROR"。否则,访问者会立即以为自己做错了什么。相反,你应该道歉,并且鼓励访问者点击导航链接查找其它信息。

3. Your error pages should look just like the rest of your web pages. Each error page should contain good navigational links, a search feature, and provide information in regard to the specific error they received.

3.
错误网页外观应该与其它网页相同,也应该包括正确的导航链接、搜索功能并且提供与客户收到的具体错误相关的信息。

If you'd like to see an example error page, visit the following web address: Web-source.net

你可以登录Web-source.net,参考此网站的错误页面。

Once you've created an error page, save it as the error name. For example, if you're creating a customized error page for a 400 Bad Request error, your page should be saved as 400.html.

错误页面一旦创建完成,应该保存为网页错误名称。比如,为400 Bad Request创建的错误网页,就应该保存为400.html

Here are some of the more common errors:


下面介绍几种常见错误:

400 Bad Request 400 请求出错)
401 Authorization Required
401未授权)
403 Forbidden
403 禁止)
404 File Not Found
404文件未找到)
405 Method Not Allowed
405方法不适用)
500 Internal Server Error
500内部服务器错误) 
501 Method Not Implemented
501方法未执行)
502 Bad Gateway
502数据接收失败)
503 Service Temporarily Unavailable
503临时不提供服务)

Once you've created your pages, you'll need to access your server via FTP and create a new folder called "errordocs" where you store your HTML files. Upload your new error documents into your new folder.

网页一旦创建,你需要通过FTP与服务器连接,创建名为"errordocs"的文件夹,以储存HTML文件。这样可以把新的错误文件上传到新的文件夹中。

Your next step will be to locate your .htaccess file and download it to your computer. (If you use FrontPage to publish your web pages, you cannot customize the .htaccess file, as FrontPage uses the .htaccess file. Editing the file may cause errors in your configuration.) The .htaccess file should be located on your server where you store your HTML files.

下一步,你需要查找并下载.htaccess文件。如果利用FrontPage呈现页面,就不能订制.htaccess文件,因为FrontPage使用.htaccess文件,否则会引起结构上的错误。.htaccess文件应该位于储存HTML文件的服务器中。

If the .htaccess file isn't visible, you can create one within a plain text editor. However, you must first make sure your server isn't configured to hide the file. Your FTP program should enable you to choose to display hidden files and folders on your server.

如果.htaccess文件不能显现,你可以在纯文本编辑器中创建。然而,首先你要确保服务器不会隐藏文件,FTP程序应该能够让你选择在服务器中呈现的隐藏文件与文件夹。

Once you've downloaded your .htaccess file, open it within a plain text editor, such as Note Pad, and add the following lines below any other text that may be present:

.htaccess
文件一旦下载完成,在纯文本编辑器中打开,就像便签簿。在呈现的文本下添加线条:

ErrorDocument 400 /errordocs/400.html
ErrorDocument 401 /errordocs/401.html
ErrorDocument 403 /errordocs/403.html
ErrorDocument 404 /errordocs/404.html
ErrorDocument 405 /errordocs/405.html
ErrorDocument 500 /errordocs/500.html
ErrorDocument 501 /errordocs/501.html
ErrorDocument 502 /errordocs/502.html
ErrorDocument 503 /errordocs/503.html

If you're creating your own .htaccess file, open a plain text editor and add the above lines.

如果正在创建自己的.htaccess文件,可以打开文本编辑器,添加上面这样的斜线。

When typing in the information, make certain you type it exactly as it appears above. You can include the error documents of your choice.

在键入信息时,确保信息像上文介绍的那样准确。可以包含自己选择的错误文件。

Once the file is complete, save it as .htaccess and upload it to your server, via FTP in ASCII mode, where you store your HTML files.

文件一旦完成,保存为.htaccess,并通过ASCII模式中的FTP上传到储存HTML文件的服务器中。

For additional information on File Transfer Protocol (FTP) you may visit: Web-source.net

你可以登录Web-source.net获取更多的FTP信息。

If you have a Windows operating system, you will be unable to save the file as .htaccess. You'll need to save it as htaccess.txt. Once you upload the file to your server, you can rename it to .htaccess.

如果运用Window操作系统,你就不能把文件保存为.htaccess类型,而需要保存为htaccess.txt。在上传到服务器之后,可以重新命名为.htaccess

That's all there is to it. When your visitors click on an outdated link, your custom error page will now be displayed.

这就是制作错误网页的全部内容。当浏览者点击过期链接时,制作的错误页面就会呈现。

Creating your own custom error pages is well worth the time and effort, as they will enable you to recover an unlimited number of your visitors. If you follow this step by step guide, you can have your pages up and running in no time.

创建网站的错误页面确实耗费时间与精力,但很有效果,它可以帮助网站挽回许多浏览者。按照以上方法制作错误页面,不久这些网页就会产生作用。

评论 (0) All

登陆 | 还没注册?