Case Insensitivity With .Htaccess Files


If you have an .htaccess file to control the flow of URI’s on your site you may want to look at adding a nice little “case insensitive” feature to each line/item.

So an example of a line of .htaccess without any case insensitive bells and whistles looks like this:

RewriteRule ^AndrewOdendaal$ index.php?go=2964

We add our Case Insensitive feature by just adding a [NC] to the end of the line, like this:

RewriteRule ^AndrewOdendaal$ index.php?go=2964 [NC]

This is really handy when you have your site visitors typing things in themselves, as they love to add random CAPS where they like and without adding this it will just throw a 404 PAGE NOT FOUND error back at them.
So a really nice and easy way to get this working! I love Apache!