mod_speling
mod_speling overview
mod_speling module
tries to correct misspelled URLs by performing case-insensitive filename search in requested folder or allowing one misspelling (character insertion/omission/transposition or wrong character).
If, after scanning the folder,
- no matching document was found, Ape proceeds as usual and returns a "document not found" error
- only one document is found that "almost" matches the request, it is returned in the form of a redirection response
- 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 option
mod_speling directives
CheckCaseOnly
| Description: |
Limits actions of the module to case-insensitive search only |
| Syntax: |
CheckCaseOnly on|off |
| Default: |
CheckCaseOnly off |
| Context: |
server config, virtual host, directory, .htaccess |
| Module: |
mod_speling |
CheckCaseOnly directive enabled (on) limits the scope of actions of the mod_speling module to lower/upper case changes. Other possible corrections are not performed.
Example:
CheckCaseOnly on
CheckSpelling
| Description: |
Enables mod_speling module |
| Syntax: |
CheckSpelling on|off |
| Default: |
CheckSpelling off |
| Context: |
server config, virtual host, directory, .htaccess |
| Module: |
mod_speling |
CheckSpelling directive enables mod_speling module functionality.
When enabled, keep in mind that
- the directory scan needed for spelling correction may affect the server's performance when many spelling corrections are performed at a time
- the document trees should not contain sensitive files which could be matched unintendedly by a spelling "correction"
- the module is unable to correct misspelled user names - only filenames or folder names
- spelling corrections are applied strictly to existing files, so a request for /status may be incorrectly treated as "/stats.html" file.
Example:
CheckSpelling on
CheckBaseName
| Description: |
Checks filename without extension |
| Syntax: |
CheckBaseName on|off |
| Default: |
CheckBaseName off |
| Context: |
server config, virtual host, directory, .htaccess |
| Module: |
mod_speling |
CheckBaseName directive performs an extension-insensitive filename check, i.e. if the requested filename exactly matches some existing file in the target folder but their extensions are different, this existing file is shown in response.
Note! This directive is not supported in Apache but such functionality may be realized by recompiling the module with certain parameters.
Example:
CheckBaseName on