Problems with some rewrite

revirii nginx-forum at nginx.us
Tue Aug 24 12:45:52 MSD 2010


I've simplified the last rule a bit, to see where the problem might be.

[code]
rewrite "^/img/default/([0-9] {3})([0-9]
{3})/(.*)\.(gif|jpg|jpeg|png|tiff|bmp)$" http://www.google.com break;
->
rewrite "^/img/default/(.*)/(.*)\.(gif|jpg|jpeg|png|tiff|bmp)$"
http://www.google.com break;
[/code]

So i replaced (-?[0-9] {3})(-?[0-9] {3})(-?[0-9]+) with (.*), and now
the rule works. So the problem is here: (-?[0-9] {3})(-?[0-9]
{3})(-?[0-9]+)

I took/adapted this rule from
http://wiki.nginx.org/NginxHttpRewriteModule#rewrite , but for some (to
me unknown) reasons it isn't working. Any idea?

well, nginx version: 0.6.32, debian lenny.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,123057,123068#msg-123068




More information about the nginx mailing list