[development] Tracking, fixing and redirecting 404's

Khalid B kb at 2bits.com
Sun Dec 11 04:33:22 UTC 2005


This is a very good scheme.

I wrote customerror to give the user an admin defined message for 404
and 403, as well as redirecting the user from a 403 to the the page
they were trying to access after a 403.

There has been requests to add PHP to customerror, presumably for
admins to add custom code that will do what you just described, or
parts of it.

As for your scheme, parts of it used to exist with a old redirect
(part of legacy?), that was dropped in favor of Apache level rewrites
(since they are faster). For a large site your scheme can be a
performance drag. We also have to be careful that this module does not
conflict with path aliases by being cyclic (e.g. put a redirect limit
of 3 or 5).

I think this is work turning into a module.

On 12/9/05, Mike Gifford <mike at openconcept.ca> wrote:
> Hello,
>
> This has been discussed a number of times, but there doesn't seem to
> be any comprehensive response to dealing with 404's.  The best
> solution I've seen is to send a user to a search form.  While this is
> better than showing them an error page it's not ideal either.
>
> I'm now in the process of migrating a largish static site to Drupal.
>
> What I would like to see is:
>
> 1) A page listing like admin/logs' Page Not Found reference but tracking
>         - The most frequently incorrectly accessed page (in the log's history)
>         - The biggest source of incorrect links (separated by internal &
> external links)
>         - It should also be divided into those links that have specified
> redirects and those links which do not yet have a specified redirect
> defined (see below)
> 2) A link from the summary list above (next to details) to a redirect
> link that would allow you to indicate where that page should go.
>         - This  should list the redirect and allow you to edit it (if it is
> defined), or indicate that you can define the redirect.
>         - It should also allow the admin to define either the full or
> partial URL as part of the redirect (sometimes multiple domains may
> be directed).
>         - Would be great to see a list of all referrers (in the log's
> history) as an option here too to make it easier to update the links
> 3) After a redirect link is defined it should be transparent to the
> visiter.  The use of the redirect should still be logged (as it is
> better to know that links should be updated on an external site).
> However, if a redirect hasn't been defined the user should be:
>         - presented with a search page that is populated by strings parsed
> from the incorrect URL.
>         - the choice that the users make should be logged and it would be
> really cool if there was an auto mode to set up a redirect link (if
> say 10 people all choose the same link).
>
> A module like this would make it easy for admins to know which urls
> are the biggest problem and provide them tools to fix it.
>
> Does something like this already exist?  Are people interested in
> adding this kind of functionality (would make migrations easier after
> all).  Are there things that should be on this 404 wish list that are
> missing?
>
> I'm interested in hearing from folks though and then seeing if we
> can't get something developed to do it.


More information about the development mailing list