断链预防器 [英] A broken link preventer

查看:67
本文介绍了断链预防器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个工具可以告诉我访问者尝试访问从我的网站到外部网站的链接的次数以及回复

代码收到的次数是。如果远程站点返回错误

代码,它们不会被发送到远程站点 - 为什么这么麻烦,它不会是b
工作!


由于我有超过1000个外部链接,这使我可以找到人们最常见的

损坏链接,并先修复这些链接。

常规链接检查器提供免费服务并检测损坏链接的实例
实例而不是频率实例。

程序输出可以根据时间生成报告,链接

访问,我的网站上发生链接的页面等等。


这意味着在我的网站上,我现在可以更好地控制什么

如果访问者在外部链接上看到404就会发生我可以

为他们提供更多选项。


试试吧在这里
http://www.siliconglen.com/Scotland/ 2_2.html


虽然接受破坏的链接通常是坏事,但这个工具

至少可以帮助我更有效地管理它们。


评论,欢迎反馈。这是一个早期版本所以可能会有

错误,但我希望不会:-)


-

Craig Cockburn( "柯")。
http://www.SiliconGlen.com/

到苏格兰的第一个在线指南,成立于1994年。

苏格兰常见问题解答,婚礼,网站设计,停止垃圾邮件等等!

解决方案

Craig Cockburn写道:

我有一个工具告诉我访问者尝试访问从我的网站到外部网站的链接的次数以及收到的回复代码是。如果远程站点返回错误代码,它们不会被发送到远程站点 - 为什么麻烦,它不会工作!

因为我有超过1000个外部链接,这使我可以找到人们最常看到的断开链接并首先解决这些问题。
常规链接检查器提供免费服务并检测链接断开的情况,而不是频率实例看到。

程序的输出可以根据时间生成报告,访问链接,链接发生在我网站上的页面等等。

这个意味着在我的网站上,如果访问者在外部链接上看到404并且我可以为他们提供更多选项,我现在可以更好地控制发生什么。

试试这里
http://www.siliconglen.com/苏格兰/ 2_2.html

虽然接受破碎的链接是一般的不好的是,这个工具至少可以帮助我更有效地管理它们。

评论,反馈欢迎。这是早期发布,所以可能有错误但我希望不会:-)



Craig,


似乎在这里工作,向用户提供的建议很有帮助。


1.我建议您自己提供
$ b而不是依赖UCSD $ b解释错误,只显示适合

即时情况的那个。


2.我使用的是Netscape 7.1。当我看到你的

例子中的链接列表时,我倾向于在一个标签中打开列表打开的页面,然后

右键单击每个链接我''感兴趣并从结果弹出菜单中选择在新标签页中打开

。但是代码中的某些内容会阻止弹出窗口中出现

选项(以及其他几个选项)。


Chris Beall


Krustov写道:

TMK如果一个网站使用自定义404页面,那么它就不会显示为一个破碎的
链接。



有时是的。但是,配置良好的Web服务器在显示自定义404页面时返回404标题,甚至是
。当然,有许多配置很差的网络服务器。


史蒂夫

" Steve Pugh"写道:

Krustov写道:

TMK如果一个网站使用自定义404页面,那么它不会显示为一个破碎的链接。



有时是的。但是,在显示自定义404页面时,配置良好的Web服务器甚至会返回404标头。当然,还有许多配置不当的Web服务器。




我认为最常见的错误是在<使用完全限定的URL br />
ErrorDocument指令。例如:


ErrorDocument 404 http ://example.com/error-docs/not_found.html

将导致服务器向错误页面发出301重定向标题

它找不到所要求的文件。然后将提供eror页面

a''200 OK"标题。


这些都在Apache文档中解释过。


-

phil [dot ] ronan @ virgin [dot] net
http://vzone.virgin .net / phil.ronan /


I have a tool which tells me the number of times that visitors attempt
to access a link from my site to an external site and what the response
code received was. In the event of the remote site returning an error
code, they are not sent to the remote site - why bother, it wouldn''t
work!

Since I have over 1000 external links, this allows me to locate the
broken links that people see the most often and fix those first.
Conventional link checkers offer a complimentary service and detect
instances of broken links rather than instances of frequency seen.
The output from the program can generate reports based on time, link
accessed, page on my site where the link occurred and so on.

This means that on my site, I now have much better control over what
happens if the visitor would see a 404 on an external link and I can
offer them more options.

Try it out here
http://www.siliconglen.com/Scotland/2_2.html

Whilst accepting that broken links are a generally bad thing, this tool
at least helps me to manage them more effectively.

comments, feedback welcome. This is an early release so there may be
bugs but I hope not :-)

--
Craig Cockburn ("coburn"). http://www.SiliconGlen.com/
Home to the first online guide to Scotland, founded 1994.
Scottish FAQ, weddings, website design, stop spam and more!

解决方案

Craig Cockburn wrote:

I have a tool which tells me the number of times that visitors attempt
to access a link from my site to an external site and what the response
code received was. In the event of the remote site returning an error
code, they are not sent to the remote site - why bother, it wouldn''t work!

Since I have over 1000 external links, this allows me to locate the
broken links that people see the most often and fix those first.
Conventional link checkers offer a complimentary service and detect
instances of broken links rather than instances of frequency seen.
The output from the program can generate reports based on time, link
accessed, page on my site where the link occurred and so on.

This means that on my site, I now have much better control over what
happens if the visitor would see a 404 on an external link and I can
offer them more options.

Try it out here
http://www.siliconglen.com/Scotland/2_2.html

Whilst accepting that broken links are a generally bad thing, this tool
at least helps me to manage them more effectively.

comments, feedback welcome. This is an early release so there may be
bugs but I hope not :-)


Craig,

Seems to work here and the suggestions provided to the user are helpful.

1. Rather than depend on UCSD, I''d suggest you provide your own
explanation of the error, showing only the one appropriate to the
immediate situation.

2. I used Netscape 7.1. When I see a list of links like those in your
example, I tend to keep the page with the list open in one tab, then
right click on each link I''m interested in and select "Open in new tab"
from the resulting popup menu. But something in your code prevents that
option (and several others) from appearing in the popup.

Chris Beall


Krustov wrote:

TMK if a website uses custom 404 pages then it wont show up as a broken
link .



Sometimes yes. But well configured web servers return 404 headers even
when displaying a custom 404 page. There are, of course, many badly
configured web servers out there.

Steve


"Steve Pugh" wrote:

Krustov wrote:

TMK if a website uses custom 404 pages then it wont show up as a broken
link .



Sometimes yes. But well configured web servers return 404 headers even
when displaying a custom 404 page. There are, of course, many badly
configured web servers out there.



I think the most common mistake is to use a fully qualified URL in the
ErrorDocument directive. For example:

ErrorDocument 404 http://example.com/error-docs/not_found.html

will cause the server to issue a 301 redirect header to the error page when
it can''t find the requested document. The eror page will then be served with
a ''200 OK" header.

It''s all explained in the Apache documentation.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/


这篇关于断链预防器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆