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?
-
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
On Debian/Ubuntu
-
Log in via SSH as root.
-
Enable the module:
Bash a2enmod speling -
Restart Apache:
Bash service apache2 restart -
Configure
.htaccessor site config:<IfModule mod_speling.c> CheckCaseOnly on CheckSpelling on </IfModule>
On AlmaLinux/Fedora
-
Log in via SSH as root.
-
Verify if the module is loaded:
Bash httpd -M | grep spelingOutput should include:
Bash speling_module (shared) -
If not loaded, add this line to
/etc/httpd/conf/httpd.conf:LoadModule speling_module modules/mod_speling.so -
Restart Apache:
Bash service httpd restart -
Configure
.htaccessor site config as shown above.
Testing mod_speling
-
Create a file named
test.html. -
Access it in your browser using variations like:
-
Test.html -
TEST.HTML -
test.HTML
-
-
Apache should serve the correct file regardless of case.
Important Notes
|