2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <modulesynopsis metafile="mod_speling.xml.meta">
25 <name>mod_speling</name>
26 <description>Attempts to correct mistaken URLs by ignoring
27 capitalization, or attempting to correct various minor
28 misspellings.</description>
29 <status>Extension</status>
30 <sourcefile>mod_speling.c</sourcefile>
31 <identifier>speling_module</identifier>
37 <p>Requests to documents sometimes cannot be served by the core
38 apache server because the request was misspelled or
39 miscapitalized. This module addresses this problem by trying to
40 find a matching document, even after all other modules gave up.
41 It does its work by comparing each document name in the
42 requested directory against the requested document name
43 <strong>without regard to case</strong>, and allowing
44 <strong>up to one misspelling</strong> (character insertion /
45 omission / transposition or wrong character). A list is built
46 with all document names which were matched using this
49 <p>If, after scanning the directory,</p>
52 <li>no matching document was found, Apache will proceed as
53 usual and return a "document not found" error.</li>
55 <li>only one document is found that "almost" matches the
56 request, then it is returned in the form of a redirection
59 <li>more than one document with a close match was found, then
60 the list of the matches is returned to the client, and the
61 client can select the correct candidate.</li>
68 <name>CheckSpelling</name>
69 <description>Enables the spelling
71 <syntax>CheckSpelling on|off</syntax>
72 <default>CheckSpelling Off</default>
74 <context>server config</context>
75 <context>virtual host</context>
76 <context>directory</context>
77 <context>.htaccess</context>
79 <override>Options</override>
82 <p>This directive enables or disables the spelling module. When
83 enabled, keep in mind that</p>
86 <li>the directory scan which is necessary for the spelling
87 correction will have an impact on the server's performance
88 when many spelling corrections have to be performed at the
91 <li>the document trees should not contain sensitive files
92 which could be matched inadvertently by a spelling
95 <li>the module is unable to correct misspelled user names (as
96 in <code>http://my.host/~apahce/</code>), just file names or
99 <li>spelling corrections apply strictly to existing files, so
100 a request for the <code><Location /status></code> may
101 get incorrectly treated as the negotiated file
102 "<code>/stats.html</code>".</li>
105 <!-- XXX: is that really true?! -nd -->
106 <p>mod_speling should not be enabled in <a href="mod_dav.html">DAV</a>
107 enabled directories, because it will try to "spell fix" newly created
108 resource names against existing filenames, e.g., when trying to upload
109 a new document <code>doc43.html</code> it might redirect to an existing
110 document <code>doc34.html</code>, which is not what was intended.
116 <name>CheckCaseOnly</name>
117 <description>Limits the action of the speling module to case corrections</description>
118 <syntax>CheckCaseOnly on|off</syntax>
119 <default>CheckCaseOnly Off</default>
121 <context>server config</context>
122 <context>virtual host</context>
123 <context>directory</context>
124 <context>.htaccess</context>
126 <override>Options</override>
129 <p>When set, this directive limits the action of the spelling correction
130 to lower/upper case changes. Other potential corrections are not performed,
131 except when <directive>CheckBasenameMatch</directive> is also set.</p>
136 <name>CheckBasenameMatch</name>
137 <description>Also match files with differing file name extensions.</description>
138 <syntax>CheckBasenameMatch on|off</syntax>
139 <default>CheckBasenameMatch Off</default>
141 <context>server config</context>
142 <context>virtual host</context>
143 <context>directory</context>
144 <context>.htaccess</context>
146 <override>Options</override>
149 <p>When set, this directive extends the action of the spelling correction
150 to the file name extension. For example a file <code>foo.gif</code> will
151 match a request for <code>foo</code> or <code>foo.jpg</code>. This can be
152 particulary useful in conjunction with
153 <a href="../content-negotiation.html">MultiViews</a>.</p>