kayodeok said:
At the time I read Brucie's post to Dennis M Marks, I had just got
out of bed and I misintepreted his post to mean that if a user clicks
an external link that had gone bad, it would show up in the
webmaster's log (which I know is not possible) and at the same time,
the link will be removed from the webmaster's pages...
It would certainly be possible to set up something nice like this.
Go through all your pages and replace:
<a href="
http://example.org/some_external_link/">foo</a>
with:
<a href="/external?
http://example.org/some_external_link/">foo</a>
where "/external" is a CGI/PHP/whatever script that does the following:
1. Look at the query string and extract the URL.
2. Issue an HTTP 'HEAD' request for the URL.
3. If the response code is less than 200 or greater than 399,
jump to step 6.
4. Redirect the user to the URL.
5. Jump to step 8.
6. E-mail the URL and response code to yourself.
7. Output a pretty error message to the visitor explaining why
the link doesn't work and offering a link back to the page
they've just come from (you could use the query string or
the HTTP 'Referer' header for this!)
8. Script ends.
(My pseudo code is full of GOTOs. Naughty me.)
Could actually be quite a nice system. The only real problem is that when
the visitor hovers your external links he won't see the proper URL, but
this could be added to @title, or even replaced using ECMAscripting.