mod_speling.html revision 57a38b7eede40bb757254e46f58900c6b87dd3df
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan<HTML>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <HEAD>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <TITLE>Apache module mod_speling</TITLE>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan </HEAD>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <BODY
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan BGCOLOR="#FFFFFF"
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan TEXT="#000000"
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan LINK="#0000FF"
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan VLINK="#000080"
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan ALINK="#FF0000"
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan >
ccf9d4a5c6453fa9f8b839baeee25147865fbb7dJames Phillpotts<!--#include virtual="header.html" -->
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <H1 ALIGN="CENTER">Module mod_speling</H1>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <P>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan This module is contained in the <code>mod_speling.c</code> file,
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan and is <strong>not</strong> compiled in by default.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan It attempts to correct misspellings of
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan URLs that users might have entered, by ignoring capitalization
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan and by allowing up to one misspelling.<br>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan This catches the majority of misspelled requests. An automatic
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan "spelling corrected" redirection is returned if only one matching
e6d7ebe1d98f7f030969e521b061f8643253475eDirk Hogan document was found, and a list of matches is returned if more than
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan one document with a sufficiently similar name is found.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan </P>
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <h2>Summary</h2>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <p>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan Requests to documents sometimes cannot be served by the core apache
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan server because the request was misspelled or miscapitalized. This
ccf9d4a5c6453fa9f8b839baeee25147865fbb7dJames Phillpotts module addresses this problem by trying to find a matching document,
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan even after all other modules gave up. It does its work by comparing
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan each document name in the requested directory against the requested
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan document name <STRONG>without regard to case</STRONG>, and allowing
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <STRONG>up to one misspelling</STRONG> (character insertion / omission
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan / transposition or wrong character). A list is built with all document
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan names which were matched using this strategy.
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan </p>
ccf9d4a5c6453fa9f8b839baeee25147865fbb7dJames Phillpotts <p>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan If, after scanning the directory,
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <ul>
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan <li>no matching document was found, Apache will proceed as usual
e6d7ebe1d98f7f030969e521b061f8643253475eDirk Hogan and return a "document not found" error.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <li>only one document is found that "almost" matches the request,
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan then it is returned in the form of a redirection response.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <li>more than one document with a close match was found, then
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan the list of the matches is returned to the client, and the client
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan can select the correct candidate.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan </ul>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan </p>
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan
ccf9d4a5c6453fa9f8b839baeee25147865fbb7dJames Phillpotts <h2>Directives</h2>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <menu>
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan <li><A HREF="#checkspelling">CheckSpelling</A>
e6d7ebe1d98f7f030969e521b061f8643253475eDirk Hogan </menu>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <HR> <!-- the HR is part of the directive description -->
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <A name="checkspelling"><h2>CheckSpelling</h2></A>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <!--%plaintext &lt;?INDEX {\tt CheckSpelling} directive&gt; -->
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan <strong>Syntax:</strong> CheckSpelling <em>on/off</em><br>
3744900be632496920d4c9aca8f94ba6db4dd882Dirk Hogan <strong>Default:</strong> <code>CheckSpelling Off</code><br>
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <Strong>Context:</strong> server config, virtual host<br>
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan <strong>Status:</strong> Base<br>
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan <strong>Module:</strong> mod_speling<br>
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan <strong>Compatibility:</strong> CheckSpelling was available as a separately
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan available module for Apache 1.1, but was limited to miscapitalizations.
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan As of Apache 1.3, it is part of the apache distribution<!-- or:
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan available as a separate module-->.<p>
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan This directive enables or disables the spelling module. When enabled,
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan keep in mind that
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan <UL>
3744900be632496920d4c9aca8f94ba6db4dd882Dirk Hogan <LI>the directory scan which is necessary for the spelling
dcf0ce40c27bbcd1b429aaf915b5dfa385a59d7eDirk Hogan correction will have an impact on the server's performance
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan when many spelling corrections have to be performed at the same time.
9d406c6b25ce9f6bf266b077443e723b95962914Dirk Hogan <LI>the document trees should not contain sensitive files which could
be matched inadvertently, by a spelling "correction".
<LI>the module is unable to correct misspelled user names
(as in <code>http://my.host/~apahce/</code>), just file names or
directory names.
</UL>
<!--#include virtual="footer.html" -->
</BODY>
</HTML>