How to enable non-case sensitive URL matching?

  • Answered

I have just recently switched hosting providers; my previous being a Windows based server host and I would like to know how I can enable non-case sensitive URL searches on my new Linux setup. I appreciate that in general it is good practice to use lowercase directory/file names - but this is an existing site with lots of directories and files; with links scattered across the internet.

I have a standard shared hosting account/setup, with all the default settings provided by inmotion. Any pointers on how I can accomplish this would be appreciated as I have tried everything that I have so far found on the 'tinter and I am unable to get any of it to work.

Hello James, Thank you for your question on non-case sensitive URL matching. The answer is that Yes, there is a way, and No, it is not easy, at least on a shared server. There are commands for Apache that will allow case insensitivity so that URLs would run much like Windows. The issue is that the change must be made in the httpd.conf file. This is the main apache configuration file for the server. On shared servers, we cannot make such sweeping changes as that would affect all accounts on the server. The .htaccess file allows you to make changes to the configuration of Apache down to an account or even folder level. Unfortunately, the commands required for case insensitivity are not allowed in the htaccess file. There is a workaround code that, while it will work, can also break other things on your site. You can find that code here if you wish to try to use it. The only other option, would be to set up individual 301 redirect rules for each link. Though tedious, it would allow existing links to redirect without a 404 error, which Google would notice and penalize the site if there were too many over time. Kindest Regards, Scott M