lucy24 - 5:26 pm on Jan 16, 2012 (gmt 0)
I think I should also change [^/]+ to [^/]* in order to catch consecutive slashes
It would be nice to say that you're not obligated to code for malformed URLs-- but something elsewhere in your config file may be silently removing the duplicates. (No idea what mod, but I see it occasionally in logs where a request containing // but otherwise correct will lead to a 200.) The catch is that // can be seen as either a null directory-- two slashes with no [^/] between-- or as a superfluous slash that might come in the middle of a perfectly legitimate path.
Do those deeply-nested files really not exist, or are you just asking everyone-- including yourself-- to stay the ### out?