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]: captures in regex location



Hello Igor,

IS> , - :
IS>      server {
IS>          listen  8000;
IS>          server_name  ~^(?:www\.)?(.+)$;
IS>          location / {
IS>              root   /path/to/$1;
IS>          }
IS>      }

   server {
       listen  8000;
       server_name  ~^(?:www\.)?(.+)\.(.+)$;

       location /(.+) {

       }
   }

   http://www.foo.com/bar

    location $1  $2  ?
     $1 = bar
     $2 = com

      

-- 
Best regards,
 Andrew                            mailto:sitnikov@xxxxxxxxxx




 




Copyright © Lexa Software, 1996-2009.