Mailing List Archive

Yet Another Suggestion
Before I run off and code this, what do people think about, in the case
of a "404 not found", the server checks to see if the file being
requested was simply incorrectly capitalized by trying a case-insensitive
search for the object, and if it's found, issuing a redirect? This accounts
for the vast majority of 404 entries in my error_log, for some reason.
I'm sure this would be a system-heavy feature but those with CPU to spare
might like it - not as an excuse to be sloppy with URL's but as a way to
simply serve people better. Instead of a redirect perhaps this could be
an extra message to give the 404 response, i.e.

The URL /foobar.html was not found. However, <a
href="/FooBar.html">/FooBar.html</a> exists, if you meant that.

Of course a search for case-insensitive matches could turn up more than
one match.

Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@hotwired.com brian@hyperreal.com http://www.hotwired.com/Staff/brian/
Re: Yet Another Suggestion [ In reply to ]
Cool idea Brian. Many of my errors are also typos.
Re: Yet Another Suggestion [ In reply to ]
Brian suggests...

> simply serve people better. Instead of a redirect perhaps this could be
> an extra message to give the 404 response, i.e.
>
> The URL /foobar.html was not found. However, <a
> href="/FooBar.html">/FooBar.html</a> exists, if you meant that.
>
> Of course a search for case-insensitive matches could turn up more than
> one match.

does it need to be in the server ?, it can be done by redirecting
404 to a perl script. It'd be a lot easier to do fancy 404 recovery
in perl than inside Apache - the script could even have a table of
commonly screwed up URLs. Also, if you find a bad link that the
owner refuses to fix, you can redirect back to his site.. take that !
Re: Yet Another Suggestion [ In reply to ]
On Mon, 10 Apr 1995, Rob Hartill wrote:
> Brian suggests...
> > simply serve people better. Instead of a redirect perhaps this could be
> > an extra message to give the 404 response, i.e.
> >
> > The URL /foobar.html was not found. However, <a
> > href="/FooBar.html">/FooBar.html</a> exists, if you meant that.
> >
> > Of course a search for case-insensitive matches could turn up more than
> > one match.
>
> does it need to be in the server ?, it can be done by redirecting
> 404 to a perl script. It'd be a lot easier to do fancy 404 recovery
> in perl than inside Apache - the script could even have a table of
> commonly screwed up URLs. Also, if you find a bad link that the
> owner refuses to fix, you can redirect back to his site.. take that !

I gotta keep reminding myself how powerful this method of custom error
responses it. Thanks, Rob, this is a good place to start, especially
since 404 probably represents a very small percentage of the hits on a
given site anyways. I rescind my suggestion (though it'd be a cool thing
to include in the distribution if/when it gets written).

Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@hotwired.com brian@hyperreal.com http://www.hotwired.com/Staff/brian/
Re: Yet Another Suggestion [ In reply to ]
On Mon, 10 Apr 1995, Brian Behlendorf wrote:
> I gotta keep reminding myself how powerful this method of custom error
> responses it.

I've been using redirected error messages for a while - My custom
perl script does a fuzzy match on the entered URL to a list of all valid
URL's and offers the user a choice
http://www.telescope.org/rto/indox.htlm offers them /rti/index.html

Its interesting to look through the fails - nearly every one is caused
by the user mistyping a URL - missing case or transposing a few characters.

Mark J Cox ----------------------- URL:http://www.telescope.org/mark.html
University of Bradford, UK --------------- tel +44.1274.384070/fax 391333