how to fix the rewrite rule?

21andy nginx-forum at
Thu Jul 19 08:32:47 UTC 2012

this works fine
rewrite "^/([a-f0-9]{2})([a-f0-9]{18})\.(jpg|png|gif)$"
/test.php?a=$1&b=$2&c=$3 last;

open /a669164f02f6fdc18f.jpg

test.php would output
Array ( [a] => ad [b] => a669164f02f6fdc18f [c] => jpg )

but this DO NOT WORK
rewrite "^/([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{14})\.(jpg|png|gif)$"
/test.php?a=$1&b=$2&c=$3 last;
it return 404 error

how can i fix this?

Posted at Nginx Forum:,228725,228725#msg-228725

More information about the nginx mailing list