RewriteRule ^(([a-zA-Z]+/?)+)((([0-9]+)/([a-zA-Z]+))/?)?$ index.php?path=$1&id=$5&action=$6 [QSA,NC,L]
This rule matches any number of 'alphanumeric/' followed by an optional 'numeric/string' followed by an optional '/'.
None of the trailing slashes are required for the pattern. But, for some reason, Apache.exe goes into an infinite loop when I try to visit:
It doesn't mind 'xxx.xxx.xxx.xxx/images/portfolio/9-t.jpg' though. The only thing I can think of is some weird (and in my case, crippling) bug that causes Apache on Windows (using XP Pro SP2) to start using 100% CPU when the pattern matches 'a/b/b.ext' But I'll test further.
Anyone have any experience with this? It's a long shot, but figured I'd try.
Seems it doesn't mind a/b/b.txt. But functions/livecounter/livecounter.txt kills it. functions/livecounter/b.txt works fine. functions/livecounter/livecounte.txt (no 'r' in filename) crashes it. What. The. !#&@