diego_xa | 3 Aug 2012 08:28
Picon

Location regular expression explanation

Hi,

I was recently reading the PHPfastcgi example at
http://wiki.nginx.org/PHPFcgiExample. When it talks about the
configuration to avoid the exploit on uploads folder, there is a
regulare expresion saying: location ~*
(^(?!(?:(?!(php|inc)).)*/blogs\.dir/).*?(php|inc)) {

I don't understand that regular expresion. Could someone explain me what
?! ?: mean or send me some link to documentation about this?? I cannot
find anything after some googling.

Thanks and regards.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,229276,229276#msg-229276
Ruslan Ermilov | 3 Aug 2012 09:17
Favicon

Re: Location regular expression explanation

On Fri, Aug 03, 2012 at 02:28:09AM -0400, diego_xa wrote:
> Hi,
> 
> I was recently reading the PHPfastcgi example at
> http://wiki.nginx.org/PHPFcgiExample. When it talks about the
> configuration to avoid the exploit on uploads folder, there is a
> regulare expresion saying: location ~*
> (^(?!(?:(?!(php|inc)).)*/blogs\.dir/).*?(php|inc)) {
> 
> I don't understand that regular expresion. Could someone explain me what
> ?! ?: mean or send me some link to documentation about this?? I cannot
> find anything after some googling.
> 
> Thanks and regards.

http://www.pcre.org/pcre.txt

Gmane