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