Re: img.$host. Как вырезать кусок домена или есть переменная?

Борис Долгов boris at dolgov.name
Wed Jan 21 00:43:19 MSK 2009


set $hewhost 'default_value';
if ( $host ~ img\.(.*)$ ) {
    set $newhost $1;
}
как-то так, наверно.

21 января 2009 г. 0:13 пользователь Vladislav Vorobiev <mymir.org@
googlemail.com> написал:

> > if и set:
> http://sysoev.ru/nginx/docs/http/ngx_http_rewrite_module.html#if
>
> Что то не понятно как в данном случае использовать rewrite. Мне надо
> откуда то получить значение $host без img
>
> из img.domain.com сделать domain.com тогда я смогу использовать
> set $newhost $host(без img).
>



-- 
С уважением, Борис Долгов.
icq 77556665
e-mail boris at dolgov.name
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20090121/ea9f3ff3/attachment.html>


More information about the nginx-ru mailing list