error_log levels

Maxim Dounin mdounin at mdounin.ru
Sat Apr 10 14:19:12 MSD 2010


Hello!

On Fri, Apr 09, 2010 at 11:28:29PM -0400, flash wrote:

> So I guess I need to start with my rewrites...here they are
> 
> rewrite ^/([0-9]+)/([_0-9a-zA-Z-]+)/?$  $theme/listing.php?mls=$1 last;
> rewrite ^/([0-9]+)/([_0-9a-zA-Z-]+)+.html?$  $theme/listing.php?mls=$1 last;

This one will backtrack in an exponential way due to "(...+)+" 
construct.  On long enough URL it will cause problems.

Here is pcretest session which demonstrates the problem:

$ pcretest
PCRE version 7.9 2009-04-11

  re> !^/([0-9]+)/([_0-9a-zA-Z-]+)+.html?$!
data> /1/1.html
 0: /1/1.html
 1: 1
 2: 1
data> /1/1.htmlx
No match
data> /1/111111111111111111111111111111111111111111111111111111111.htmlx
Error -8

[...]

> These rewrites are working like I want them too but are they 
> causing my prce errors?

Yes they are.

Maxim Dounin



More information about the nginx mailing list