I have a rather large site where the site builders have all of the internal paths automatically set to lowercase (in the pages themselves, menus, etc.). At the moment, we have other sites linking to the old (capitalized) version of several hundred to possibly 1,000+ nodes in the new D7 version of the site.
So a link to http://www.example.com/alzheimers
works fine, but if I manually enter http://www.example.com/Alzheimers
I get taken to our custom 404 (with our Drupal theme showing the message). This is a problem as it's a high visibility site with a lot of external links to the old URLs.
The sitebuilders also attempted to manually enter a redirect of /Alzheimers
→ /alzheimers
and, of course, this created an infinite redirect loop, black hole, zombie war, etc.
I attempted to handle this with apache "mod_speling", with no success, though I don't have extensive experience with this mod. I am wondering if I am possibly missing something / does it need specific rule for capitalization changes? The instructions I followed had me enable the mod and restart Apache. It didn't help.
So I'm wondering if I need to hook into the theme (hook_init
?) to grab the requested URL and throw in a little PHP to just set the string to lower. Any ideas? I don't have any problems coding it, but if there is a simpler way to handle this, any help would be tremendously appreciated.
Being as this would be a typical issue for any site written for Windows and transferred to Drupal or LAMP in general, I can't possibly be the first person to need a fix for this.
If custom Drupal code is needed, where is best to hook it in for something like this?