mirror of
https://github.com/apache/httpd.git
synced 2025-05-17 15:21:13 +03:00
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87273 13f79535-47bb-0310-9956-ffa450edef68
138 lines
4.4 KiB
HTML
138 lines
4.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>Apache module mod_speling</TITLE>
|
|
</HEAD>
|
|
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
|
|
<BODY
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#000080"
|
|
ALINK="#FF0000"
|
|
>
|
|
<!--#include virtual="header.html" -->
|
|
<H1 ALIGN="CENTER">Module mod_speling</H1>
|
|
<P>
|
|
This module attempts to correct misspellings of URLs that users
|
|
might have entered, by ignoring capitalization and by allowing up to
|
|
one misspelling.</P>
|
|
|
|
<P><A
|
|
HREF="module-dict.html#Status"
|
|
REL="Help"
|
|
><STRONG>Status:</STRONG></A> Extension
|
|
<BR>
|
|
<A
|
|
HREF="module-dict.html#SourceFile"
|
|
REL="Help"
|
|
><STRONG>Source File:</STRONG></A> mod_speling.c
|
|
<BR>
|
|
<A
|
|
HREF="module-dict.html#ModuleIdentifier"
|
|
REL="Help"
|
|
><STRONG>Module Identifier:</STRONG></A> speling_module
|
|
<BR>
|
|
<A
|
|
HREF="module-dict.html#Compatibility"
|
|
REL="Help"
|
|
><STRONG>Compatibility:</STRONG></A> Available in Apache 1.3 and later. Available as an External module in Apache 1.1 and later.
|
|
</P>
|
|
|
|
|
|
<H2>Summary</H2>
|
|
<P>
|
|
Requests to documents sometimes cannot be served by the core apache
|
|
server because the request was misspelled or miscapitalized. This
|
|
module addresses this problem by trying to find a matching document,
|
|
even after all other modules gave up. It does its work by comparing
|
|
each document name in the requested directory against the requested
|
|
document name <STRONG>without regard to case</STRONG>, and allowing
|
|
<STRONG>up to one misspelling</STRONG> (character insertion / omission
|
|
/ transposition or wrong character). A list is built with all document
|
|
names which were matched using this strategy.
|
|
</P>
|
|
<P>
|
|
If, after scanning the directory,
|
|
<UL>
|
|
<LI>no matching document was found, Apache will proceed as usual
|
|
and return a "document not found" error.
|
|
<LI>only one document is found that "almost" matches the request,
|
|
then it is returned in the form of a redirection response.
|
|
<LI>more than one document with a close match was found, then
|
|
the list of the matches is returned to the client, and the client
|
|
can select the correct candidate.
|
|
</UL>
|
|
</P>
|
|
|
|
<H2>Directives</H2>
|
|
|
|
<UL>
|
|
<LI><A HREF="#checkspelling">CheckSpelling</A>
|
|
</UL>
|
|
|
|
<HR> <!-- the HR is part of the directive description -->
|
|
<H2><A NAME="checkspelling">CheckSpelling</A> directive</H2>
|
|
<!--%plaintext <?INDEX {\tt CheckSpelling} directive> -->
|
|
<A
|
|
HREF="directive-dict.html#Syntax"
|
|
REL="Help"
|
|
><STRONG>Syntax:</STRONG></A> CheckSpelling on|off<BR>
|
|
<A
|
|
HREF="directive-dict.html#Default"
|
|
REL="Help"
|
|
><STRONG>Default:</STRONG></A> <CODE>CheckSpelling Off</CODE><BR>
|
|
<A
|
|
HREF="directive-dict.html#Context"
|
|
REL="Help"
|
|
><STRONG>Context:</STRONG></A> server config, virtual host,
|
|
directory, .htaccess<BR>
|
|
<A
|
|
HREF="directive-dict.html#Override"
|
|
REL="Help"
|
|
><STRONG>Override:</STRONG></A> Options
|
|
<BR>
|
|
<A
|
|
HREF="directive-dict.html#Status"
|
|
REL="Help"
|
|
><STRONG>Status:</STRONG></A> Base<BR>
|
|
<A
|
|
HREF="directive-dict.html#Module"
|
|
REL="Help"
|
|
><STRONG>Module:</STRONG></A> mod_speling<BR>
|
|
<A
|
|
HREF="directive-dict.html#Compatibility"
|
|
REL="Help"
|
|
><STRONG>Compatibility:</STRONG></A> 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 <SAMP>CheckSpelling</SAMP> directive was only available
|
|
in the "server" and "virtual host" contexts.
|
|
<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 <SAMP><Location /status></SAMP> may get incorrectly treated
|
|
as the negotiated file "<SAMP>/stats.html</SAMP>".
|
|
</LI>
|
|
</UL>
|
|
|
|
<!--#include virtual="footer.html" -->
|
|
</BODY>
|
|
</HTML>
|
|
|