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: rewrite



On 11/18/10 08:33, andribas wrote:
    :
[code]
if ($request_uri ~* "^/show_review\.php\?id=") {
           set $q $arg_id + [b]250000[/b];
           set $args "";
           rewrite ^\/.*$/node/$q permanent;
         }
[/code]

perl_set    ,

  ?

perl_set $new_id '
sub {
   my $r = shift;
   my $id = $r->variable("arg_id");
   return (defined $id && $id ~= /^\d+$/) ? $id + 250000 : -1;
}';

location = /show_review.php {
   rewrite ^   /node/$new_id
}

--
 Anton Yuzhaninov

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


 




Copyright © Lexa Software, 1996-2009.