Alex Rivera | Logout

Case Insensitive URLs with mod_rewrite

Asked 2010-01-04T08:14:27.597
18

I'd like for any url that doesn't hit an existing file, to do a lookup on the other possible cases and see if those files exist, and if so, 302 to them.

If that's not possible, then I'm ok with these compromises:

  • Only check the lowercase version
  • Only check the first path portion

For example http://example.com/CoOl/PaTH/CaMELcaSE should redirect to http://example.com/cool/path/camelCase (assuming the latter exists).

but of course a full solution is much more useful to me and others

Edit
Report

1 Answer

20
CheckSpelling on

Matches files and directories. See the documentation for details.

answered 2010-04-04T03:20:07.540

Your Answer