Переменные сервера в ssi

Igor Sysoev is at rambler-co.ru
Fri May 22 18:42:48 MSD 2009


On Fri, May 22, 2009 at 06:40:21PM +0400, ываукп Лвапу wrote:

> гм, сделал так:
> if ( $query_string ~ "what=([0-9]+)" ) {
> set $temp $1;
> rewrite ^cgi-bin/print.cgi /site/$temp.htm last; }
> это правильный путь? )

location = /cgi-bin/print.cgi {
    if ($args ~ what=([0-9]+)) {
        set $temp $1;
        rewrite ^ /site/$temp.htm last;
    }
}

location = /cgi-bin/print.cgi {
    if ($arg_what ~ ([0-9]+)) {
        rewrite ^ /site/$arg_what.htm last;
    }
}


-- 
Игорь Сысоев
http://sysoev.ru





More information about the nginx-ru mailing list