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
|