Nginx Rewrite Apache?

António P. P. Almeida appa at
Tue Apr 12 02:13:38 MSD 2011

On 11 Abr 2011 22h59 WEST, nginx-forum at wrote:

> dosen't work
> rewrite >
> rewrite "^[A-Z]{3}[a-z]{2}\d{4}[a-z]{3}\d{4}[A-Z]{2}[a-z]\d/(.+)$"
> files/$1;
> i trying this but not work...  rewrite "([A-Z] {3})([a-z] {2})([0-9]
> {4})([a-z] {3})([0-9] {4})([A-Z] {2})([a-z] {1})([0-9] {1})/(.+)$"
> /files/$1 last;

This is not the same thing. You're capturing a lot of stuff. In the
original expression you sent only the last pattern was a capture
group. And from the above example it seems that only the *last*
pattern is in a capture group. I'm assuming that: is your
desired result from the rewrite.

If so remove all () except the last one. Just copy the expression I've
sent in a previous message. It should do the trick.

--- appa

More information about the nginx mailing list