Michael Schröpl: Groß- und Kleinschreibung

Beitrag lesen

Hi Swen,

http://httpd.apache.org/docs/mod/mod_speling.html
Ahh. Ist der Schreibfehler (spel_l_ing) eigentlich Absicht? D

Meines Wissens ja.

Das Modul finde ich ehrlich gesagt ziemlich blöd.
Die Auswahlmöglichkeit unter gefundenen, ähnlich lautenden
Dokumenten hat für die Mehrzahl der Besucher einer Site
häufig keine Aussagekraft. Da ist eine (individuell gestaltete)
404-Seite imo sinnvoller. Und der Umstand, dass so auch (noch)
nicht verlinkte Dateien ans Tageslicht kommen können, spricht
imo auch nicht unbedingt für dieses Modul.

Im Quelltext steht:

/* mod_speling.c - by Alexei Kosut akosut@organic.com June, 1996
 *
 * This module is transparent, and simple. It attempts to correct
 * misspellings of URLs that users might have entered, namely by checking
 * capitalizations. If it finds a match, it sends a redirect.
 */

Das Modul ist also ziemlich alt und bewußt einfach gehalten, und ...

/*
 * spdist() is taken from Kernighan & Pike,
 *  _The_UNIX_Programming_Environment_
 * and adapted somewhat to correspond better to psychological reality.
 * (Note the changes to the return values)
 *
 * According to Pollock and Zamora, CACM April 1984 (V. 27, No. 4),
 * page 363, the correct order for this is:
 * OMISSION = TRANSPOSITION > INSERTION > SUBSTITUTION
 * thus, it was exactly backwards in the old version. -- PWP
 *
 * This routine was taken out of tcsh's spelling correction code
 * (tcsh-6.07.04) and re-converted to apache data types ("char" type
 * instead of tcsh's NLS'ed "Char"). Plus it now ignores the case
 * during comparisons, so is a "approximate strcasecmp()".
 * NOTE that is still allows only _one_ real "typo",
 * it does NOT try to correct multiple errors.
 */

... den Algorithmus hat die Apache Group auch nicht selbst erfunden.

Viele Grüße
      Michael