Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


   


   


   















      :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: nginx + rewrite ( )



>>  ,
>>
>>   rewrite   nginx
>>
>>
>>  rewrite "^/(.+?)/:(s|b|p|c)([0-9]+)$"                  
>>              "/index.php?op=sections&act=show&$2=$3"      
>>                last;
>>  rewrite "^/(.+?)/:(s|b|p|c)([0-9]+):(s|b|p|c)([0-9]+)$"         
>>              "/index.php?op=sections&act=show&$2=$3&$4=$5"   
>>                last;
>>  rewrite 
>> "^/(.+?)/:(s|b|p|c)([0-9]+):(s|b|p|c)([0-9]+):(s|b|p|c)([0-9]+)$"      
>>        "/index.php?op=sections&act=show&$2=$3&$4=$5&$6=$7"      
>>          last;
>>  rewrite 
>> "^/(.+?)/:(s|b|p|c)([0-9]+):(s|b|p|c)([0-9]+):(s|b|p|c)([0-9]+):(s|b|p|c)([0-9]+)$"
>>     "/index.php?op=sections&act=show&$2=$3&$4=$5&$6=$7&$8=$9"      
>>       last;
>>
>>
>>     ?  ,    9 
>>   , ..    ,    
>> .
>>
>> .

SS>   ,      .
-  -     (
,     ),     PCRE  

http://www.php.net/manual/en/regexp.reference.recursive.php

SS>    (:(s|b|p|c)(\d+))+  &$n=$(n+1),   
SS> ,   "  ".
SS>    :(s|b|p|c)(\d+)  &$1=$2,   
SS>  .

SS> proxy_pass  ,  X-Accel-Redirect  
SS>   .



-- 
Best regards,
 Sergey



_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.