mod_speling.xml revision 50c7a72992096fc56bd2d45ec4dddd8f374ff319
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<?xml version="1.0"?>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<!-- $LastChangedRevision$ -->
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<!--
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd Copyright 2002-2006 The Apache Software Foundation or its licensors, as
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd applicable.
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd Licensed under the Apache License, Version 2.0 (the "License");
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd you may not use this file except in compliance with the License.
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd You may obtain a copy of the License at
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd http://www.apache.org/licenses/LICENSE-2.0
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd Unless required by applicable law or agreed to in writing, software
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd distributed under the License is distributed on an "AS IS" BASIS,
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd See the License for the specific language governing permissions and
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd limitations under the License.
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd-->
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd<modulesynopsis metafile="mod_speling.xml.meta">
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<name>mod_speling</name>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<description>Attempts to correct mistaken URLs that
c82fca6d3f5608b946f18d37e8710b1d71e3478dndusers might have entered by ignoring capitalization and by
c82fca6d3f5608b946f18d37e8710b1d71e3478dndallowing up to one misspelling</description>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<status>Extension</status>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<sourcefile>mod_speling.c</sourcefile>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<identifier>speling_module</identifier>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<summary>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd <p>Requests to documents sometimes cannot be served by the core
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd apache server because the request was misspelled or
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd miscapitalized. This module addresses this problem by trying to
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd find a matching document, even after all other modules gave up.
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd It does its work by comparing each document name in the
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd requested directory against the requested document name
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd <strong>without regard to case</strong>, and allowing
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd <strong>up to one misspelling</strong> (character insertion /
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd omission / transposition or wrong character). A list is built
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd with all document names which were matched using this
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd strategy.</p>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd <p>If, after scanning the directory,</p>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd <ul>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd <li>no matching document was found, Apache will proceed as
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd usual and return a "document not found" error.</li>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd <li>only one document is found that "almost" matches the
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd request, then it is returned in the form of a redirection
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd response.</li>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd <li>more than one document with a close match was found, then
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd the list of the matches is returned to the client, and the
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd client can select the correct candidate.</li>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd </ul>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd</summary>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<directivesynopsis>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd<name>CheckSpelling</name>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<description>Enables the spelling
3b3b7fc78d1f5bfc2769903375050048ff41ff26ndmodule</description>
35714556a25fceb7c9bf9c4e01791b2e2a4c27c3nd<syntax>CheckSpelling on|off</syntax>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<default>CheckSpelling Off</default>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<contextlist>
<context>server config</context>
<context>virtual host</context>
<context>directory</context>
<context>.htaccess</context>
</contextlist>
<override>Options</override>
<compatibility>CheckSpelling was available as a separately available
module for Apache 1.1, but was limited to miscapitalizations. As
of Apache 1.3, it is part of the Apache distribution. Prior to Apache
1.3.2, the <code>CheckSpelling</code> directive was only available in the
"server" and "virtual host" contexts.</compatibility>
<usage>
<p>This directive enables or disables the spelling module. When
enabled, keep in mind that</p>
<ul>
<li>the directory scan which is necessary for the spelling
correction will have an impact on the server's performance
when many spelling corrections have to be performed at the
same time.</li>
<li>the document trees should not contain sensitive files
which could be matched inadvertently by a spelling
"correction".</li>
<li>the module is unable to correct misspelled user names (as
in <code>http://my.host/~apahce/</code>), just file names or
directory names.</li>
<li>spelling corrections apply strictly to existing files, so
a request for the <code>&lt;Location /status&gt;</code> may
get incorrectly treated as the negotiated file
"<code>/stats.html</code>".</li>
</ul>
<!-- XXX: is that really true?! -nd -->
<p>mod_speling should not be enabled in <a href="mod_dav.html">DAV</a>
enabled directories, because it will try to "spell fix" newly created
resource names against existing filenames, e.g., when trying to upload
a new document <code>doc43.html</code> it might redirect to an existing
document <code>doc34.html</code>, which is not what was intended.
</p>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>CheckCaseOnly</name>
<description>Limits the action of the speling module to case corrections</description>
<syntax>CheckCaseOnly on|off</syntax>
<default>CheckCaseOnly Off</default>
<contextlist>
<context>server config</context>
<context>virtual host</context>
<context>directory</context>
<context>.htaccess</context>
</contextlist>
<override>Options</override>
<usage>
<p>When set, this directive limits the action of the spelling correction to lower/upper case changes.
Other potential corrections are not performed.</p>
</usage>
</directivesynopsis>
</modulesynopsis>