On 1/14/2011 3:33 PM, Chris Snyder wrote:
Not strictly a php question, though perhaps that's the way to solve it...

I'm working with an organization that wants to leave their Windows
hosting behind, but their site is full of inconsistently cased
links.... meaning, they have pages that link to /aboutus/index.htm but
the file on disk is /AboutUs/index.htm

Aside from slapping my forehead for taking this on, is there a
shortcut, an Apache module or configuration, or some other easy way I
can fake a case-insensitive filesystem on a unix (Linux) box?

If you change all the filenames on disk to lower case, you can cheat a little and rewrite all URLs to lower case with:

RewriteEngine on
RewriteMap lowercase int:tolower
RewriteCond $1 [A-Z]
RewriteRule ^/(.*)$ /${lowercase:$1} [R=301,L]

Good Luck!

Dan
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Reply via email to