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!


Share This Article

Related Posts

Comments

There are no comments on this entry.

Trackbacks

There are no trackbacks on this entry.

Add a Comment

Required

Required

Optional

Latest Domains

1. weebly.com
(1 day ago)
2. whpromotions.co.uk
(1 day ago)
3. adsl24.co.uk
(1 day ago)
4. youryoungmodels.net
(1 day ago)
5. enom.com
(1 day ago)
6. dynect.net
(1 day ago)
7. websitewelcome.com
(1 day ago)
8. hostgator.com
(1 day ago)
9. uploading.com
(2 days ago)
10. soccernetghana.com
(2 days ago)

Services

PHP MySQL Apache Flash Air Java C++ Python