100 likes | 165 Views
mod_speling. Spell Checking and Case Sensitivity with Apache 2.2x on the Central Web Servers. What is mod_speling?.
E N D
mod_speling Spell Checking and Case Sensitivity with Apache 2.2x on the Central Web Servers
What is mod_speling? • “It does its work by comparing each document name in the requested directory against the requested document name without regard to case, and allowing up to one misspelling (character insertion / omission / transposition or wrong character).”Quoted: http://httpd.apache.org/docs/2.2/mod/mod_speling.html
Say What?! • Only the LAST segment of a URL will be corrected for case and up to one misspelling
Examples • Working URL: http://cdorg.fnal.gov/csg/index.html • Spell-Corrected URL: http://cdorg.fnal.gov/csg/indxe.html • Case-Corrected URL: http://cdorg.fnal.gov/csg/Index.htmlhttp://cdorg.fnal.gov/CSG/ • Case & Spell Corrected URL:http://cdorg.fnal.gov/csg/Indxe.html • Uncorrected (broken) URLs: http://cdorg.fnal.gov/CSG/index.htmlhttp://cdorg.fnal.gov/CSG/Index.html
Why is it this way? • mod_speling is Apache’s way to help correct minor spelling and case mistakes in a URL • Case Sensitivity is based on the OS, not Apache • UNIX / Linux is case sensitive • Windows is case insensitive
Can I Enable/Disable mod_speling manually? • Yes! • Just add a Directive to a .htaccess file • To Enable: • CheckSpelling On • To Disable: • CheckSpelling Off • Placement & Scope • Same as any .htaccess Directive. It works for any directory from where the .htaccess file is located.
Pro’s of Using mod_speling • It will correct one spelling mistake in the last segment of your URL • It will make the last segment of your URL case insensitive • This will assist Windows based web authors who are used to case insensitivity
Con’s of using mod_speling • mod_speling is just a band-aid. It hides what are essentially broken links • Each corrected page triggers a “301 Redirect” error code • Potential Security Issues • Potential Content Issues
Best Practices • When building a website: • Make all file and directory names lowercase • Make all URL segments lowercase • This makes all your links consistent and “404 Proof” within your own website.
The Big Question! • Knowing all this information:For all Future Web Servers, would you like this option enabled or disabled by default? (current web servers will remain unaffected)