Using the mod_speling Apache module
The mod_speling module in Apache helps correct minor filename errors in URLs, such as case mismatches or small typos. On ruachost.com, enabling this module can improve user experience when migrating sites from case‑insensitive systems (like Windows) to Linux servers.
Why Use mod_speling?
Section titled “Why Use mod_speling?”- Corrects case sensitivity issues (e.g.,
File.htmlvs.file.html). - Handles minor misspellings in requested filenames.
- Reduces broken links after migrations.
- Saves time by avoiding manual renaming of files and links.
Enabling mod_speling
Section titled “Enabling mod_speling”On Debian/Ubuntu
Section titled “On Debian/Ubuntu”-
Log in via SSH as root.
-
Enable the module:
Terminal window a2enmod speling -
Restart Apache:
Terminal window service apache2 restart -
Configure
.htaccessor site config:<IfModule mod_speling.c>CheckCaseOnly onCheckSpelling on</IfModule>
On AlmaLinux/Fedora
Section titled “On AlmaLinux/Fedora”-
Log in via SSH as root.
-
Verify if the module is loaded:
Terminal window httpd -M | grep spelingOutput should include:
Terminal window speling_module (shared) -
If not loaded, add this line to
/etc/httpd/conf/httpd.conf:LoadModule speling_module modules/mod_speling.so -
Restart Apache:
Terminal window service httpd restart -
Configure
.htaccessor site config as shown above.
Testing mod_speling
Section titled “Testing mod_speling”-
Create a file named
test.html. -
Access it in your browser using variations like:
Test.htmlTEST.HTMLtest.HTML
-
Apache should serve the correct file regardless of case.