Apache: support case insensitive url

Posted: June 28, 2013 in Linux, Web Server
Tags: , ,

By default, website running on Linux Apache is case sensitive, to make it case insensitive, add the following lines to your httpd.conf or .htaccess file.

CheckSpelling on  #enable mod spelling module
CheckCaseOnly on # only fix when miscapitalized

If you only enable the first line, it will affect the site’s performance when many spelling corrections have to be performed at the same time. Reference: http://httpd.apache.org/docs/current/mod/mod_speling.html Update on Mar 26 2014, mod_speling may be affected by url rewrite sometimes. One way is to bypass RewriteEngine for certain folders.

# - means do nothing; L means last rule; NC means no case
RewriteRule (^folder1|^folder2) - [L,NC]
Advertisements
Comments
  1. Bill W says:

    Thank you, your post was the only one that actually indicated that “CheckSpelling on” was required in addition to “CheckCaseOnly on”. Everything else I saw referenced only “CheckCaseOnly on”.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s