mod_speling.html revision 2eaf662cbc81e823e8d9aeb8d54e69e63032493e
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi<html xmlns="http://www.w3.org/1999/xhtml">
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <head>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <meta name="generator" content="HTML Tidy, see www.w3.org" />
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc <title>Apache module mod_speling</title>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi </head>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen
2e545ce2450a9953665f701bb05350f0d3f26275nd <body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen vlink="#000080" alink="#FF0000">
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen <!--#include virtual="header.html" -->
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <h1 align="CENTER">Module mod_speling</h1>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen <p>This module attempts to correct misspellings of URLs that
3f08db06526d6901aa08c110b5bc7dde6bc39905nd users might have entered, by ignoring capitalization and by
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi allowing up to one misspelling.</p>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <p><a href="module-dict.html#Status"
3f08db06526d6901aa08c110b5bc7dde6bc39905nd rel="Help"><strong>Status:</strong></a> Extension<br />
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <a href="module-dict.html#SourceFile"
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi rel="Help"><strong>Source File:</strong></a>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi mod_speling.c<br />
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <a href="module-dict.html#ModuleIdentifier"
11495c9f0bd33e51a25b4d532beadfbcf9b944a3nilgun rel="Help"><strong>Module Identifier:</strong></a>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi speling_module<br />
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <a href="module-dict.html#Compatibility"
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung rel="Help"><strong>Compatibility:</strong></a> Available in
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi Apache 1.3 and later. Available as an External module in Apache
645cf915f6bc22be17750bc5bb34ade8de6744dfnd 1.1 and later.</p>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <h2>Summary</h2>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <p>Requests to documents sometimes cannot be served by the core
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi apache server because the request was misspelled or
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi miscapitalized. This module addresses this problem by trying to
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi find a matching document, even after all other modules gave up.
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi It does its work by comparing each document name in the
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi requested directory against the requested document name
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <strong>without regard to case</strong>, and allowing
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <strong>up to one misspelling</strong> (character insertion /
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi omission / transposition or wrong character). A list is built
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi with all document names which were matched using this
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi strategy.</p>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <p>If, after scanning the directory,</p>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <ul>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <li>no matching document was found, Apache will proceed as
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi usual and return a "document not found" error.</li>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <li>only one document is found that "almost" matches the
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi request, then it is returned in the form of a redirection
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi response.</li>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <li>more than one document with a close match was found, then
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi the list of the matches is returned to the client, and the
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi client can select the correct candidate.</li>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi </ul>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <br />
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <br />
b2a930a0c94e9fd25f8d2b3a2c53573235db3f06nilgun
b2a930a0c94e9fd25f8d2b3a2c53573235db3f06nilgun
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <h2>Directives</h2>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <ul>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <li><a href="#checkspelling">CheckSpelling</a></li>
b2a930a0c94e9fd25f8d2b3a2c53573235db3f06nilgun </ul>
b2a930a0c94e9fd25f8d2b3a2c53573235db3f06nilgun <hr />
b2a930a0c94e9fd25f8d2b3a2c53573235db3f06nilgun <!-- the HR is part of the directive description -->
b2a930a0c94e9fd25f8d2b3a2c53573235db3f06nilgun
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <h2><a id="checkspelling"
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar name="checkspelling">CheckSpelling</a> directive</h2>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <!--%plaintext &lt;?INDEX {\tt CheckSpelling} directive&gt; -->
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <a href="directive-dict.html#Syntax"
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi rel="Help"><strong>Syntax:</strong></a> CheckSpelling
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi on|off<br />
b2a930a0c94e9fd25f8d2b3a2c53573235db3f06nilgun <a href="directive-dict.html#Default"
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar rel="Help"><strong>Default:</strong></a> <code>CheckSpelling
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Off</code><br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <a href="directive-dict.html#Context"
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi rel="Help"><strong>Context:</strong></a> server config, virtual
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi host, directory, .htaccess<br />
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <a href="directive-dict.html#Override"
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi rel="Help"><strong>Override:</strong></a> Options <br />
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <a href="directive-dict.html#Status"
b2a930a0c94e9fd25f8d2b3a2c53573235db3f06nilgun rel="Help"><strong>Status:</strong></a> Base<br />
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <a href="directive-dict.html#Module"
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi rel="Help"><strong>Module:</strong></a> mod_speling<br />
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <a href="directive-dict.html#Compatibility"
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi rel="Help"><strong>Compatibility:</strong></a> CheckSpelling
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi was available as a separately available module for Apache 1.1,
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi but was limited to miscapitalizations. As of Apache 1.3, it is
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi part of the Apache distribution. Prior to Apache 1.3.2, the
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <samp>CheckSpelling</samp> directive was only available in the
b2a930a0c94e9fd25f8d2b3a2c53573235db3f06nilgun "server" and "virtual host" contexts.
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <p>This directive enables or disables the spelling module. When
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi enabled, keep in mind that</p>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <ul>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <li>the directory scan which is necessary for the spelling
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi correction will have an impact on the server's performance
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi when many spelling corrections have to be performed at the
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi same time.</li>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <li>the document trees should not contain sensitive files
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi which could be matched inadvertently by a spelling
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi "correction".</li>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <li>the module is unable to correct misspelled user names (as
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi in <code>http://my.host/~apahce/</code>), just file names or
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi directory names.</li>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <li>spelling corrections apply strictly to existing files, so
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi a request for the <samp>&lt;Location /status&gt;</samp> may
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi get incorrectly treated as the negotiated file
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi "<samp>/stats.html</samp>".</li>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi </ul>
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi <!--#include virtual="footer.html" -->
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi </body>
b2a930a0c94e9fd25f8d2b3a2c53573235db3f06nilgun</html>
b2a930a0c94e9fd25f8d2b3a2c53573235db3f06nilgun
b2a930a0c94e9fd25f8d2b3a2c53573235db3f06nilgun