Spelling module

Spelling/Typo correction in URLs

Overview
The spelling module can transparently correct spelling mistakes and typos in the URLs provided by the client. This can include case-changes (common with clients using Windows), or attempting to fix misspellings in the document name.

If no unique file could be found that resembles the requested file, a normal 404 Not Found error page will be returned. If a file is found, the server will send a 301 Moved Permanently message to the client's browser, which will cause the client to be transparently redirected to the correct page.

Configuration
The spelling module can be configured to just fix case-problems, or to also attempt to fix typos/spelling problems in the document name.

Both options can cause the server to do a directory scan to list all the files in the directory the misspelt document is contained in. The extra directory scans may impact performance if the server frequently has to correct spelling errors.

When designing web-content, do so with spelling turned off, otherwise you may hardcode spelling mistakes into your URLs and not notice; subsequent busy use of such a site may impact performance.

If the server is configured to fix spelling mistakes, the server will rate each file in the directory against the mistyped document name, and attempt to find the filename that matches closest with what the user requested. If no filename is close, or there are multiple filenames that are quite close, the server will return a normal 404 Not Found error message. This obviously requires extra CPU processing so the previous warning applies more so.

Automatic fixing of misspellings should be used with care if you have sensitive documents in your document root that are not access controlled. The closest match to the requested document may be a 'non-published' file in that directory (i.e. one that isn't publicly hyperlinked).