PDA

View Full Version : mod_rewrite pattern works on Linux box, but crashes Apache on Windows


AaronW
01-11-2005, 10:15 PM
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 '/'.

So:
abc/
abc/def/ or
abc/def/123/ghi/

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:

xxx.xxx.xxx.xxx/functions/livecounter/livecounter.php
or
xxx.xxx.xxx.xxx/functions/livecounter/livecounter.txt

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.

Thanks,
Aaron

Edit: 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. !#&@

Noodles24
02-08-2005, 02:59 AM
Is there any info in the error.log under apache?