how to fix the rewrite rule?

Elena Zwetkow ezwetkow at gmx.de
Thu Jul 19 09:12:52 UTC 2012


Hello andi,

your solution looks a bit like my question from last
night... i use md5 hash to build my filenames, what
kind of hash do you use? 20 chars look intresing :)
are these unique hashes?

Elena


-------- Original-Nachricht --------
> Datum: Thu, 19 Jul 2012 04:32:47 -0400 (EDT)
> Von: "21andy" <nginx-forum at nginx.us>
> An: nginx at nginx.org
> Betreff: how to fix the rewrite rule?

> 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:
> http://forum.nginx.org/read.php?2,228725,228725#msg-228725
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list