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: Need help - rewrite from apache to nginx


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: Need help - rewrite from apache to nginx
  • From: Veaceslav Grecea <veaceslav.grecea@xxxxxxxxx>
  • Date: Tue, 20 Jul 2010 19:14:56 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=zIa/O77GFIsO5WjOKQ0j0JpWb7FF9E7dd270re+Xi/k=; b=rxW5+V2n0NMIBpuvXr3KQ7VNqJ2T16voTe2ISZsWQljpJ47D3v3897dO9txp4Oo6qZ rWuxYD/LEUTRASD23weSXkck0fyYLIHBJ4HcTTIo8JnX/n0z7G1JpQTcrbYlLHrCV+B1 mGNPKq0bToD0B9+nLCSyoT88KIAuPBvGlsvWY=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=hLnSxD6WsskMliN2NproTmqO6uaH/ehNfLIm7AgnOnboMkCHiXTkZKAQPx9PrlU4Rn qC/Srp9Xa9KqqknH0AlrlpPhz0A/IlX1y+So+PJGqsHNdT9oU3LHr91Lq+xjpvV6ST4R l3TkV8PWnrz4wbOiz2VJBgU6Qk3E6oromabvg=
  • In-reply-to: <20100719115826.GK47630@xxxxxxxxxxxxx>
  • References: <AANLkTin6QEBNNUskosEr638HGm2YR_vkYJmU-GYMQT5R@xxxxxxxxxxxxxx> <20100719115826.GK47630@xxxxxxxxxxxxx>

2010/7/19 Igor Sysoev <igor@xxxxxxxxx>
On Sun, Jul 18, 2010 at 08:22:35PM +0300, Veaceslav Grecea wrote:

> .
>
> :
>
> RewriteRule detail-property-results-([0-9]+).php$
> /results_detail.php?pageindex=$1&lang=en
> [NC,L]
> RewriteRule detail-property-results.php$
> /results_detail.php
> [NC,L]
> RewriteRule property/([0-9]+)/(.*).php$
> property-detail-2?propertyid=$1&lang=$2
> [R,L]
> RewriteRule property-results-([0-9]+).php$
> /results.php?pageindex=$1&lang=en
> [NC,L]
> RewriteRule property-results.php$
> /results.php?lang=en [NC,L]
>
> nginx-.
> .

( , ):

location /detail-property-results {

location = /detail-property-results.php {
fastcgi_pass ...
fastcgi_param SCRIPT_FILENAME /path/to/results_detail.php;
fastcgi_param QUERY_STIRNG "";
include fastcgi_params0;
}

location ~ ^/detail-property-results-([0-9]+)\.php$ {
fastcgi_pass ...
fastcgi_param SCRIPT_FILENAME /path/to/results_detail.php;
fastcgi_param QUERY_STIRNG pageindex=$1&lang=en;
include fastcgi_params0;
}

return 404;
}

location /property-results {

location = /property-results.php {
fastcgi_pass ...
fastcgi_param SCRIPT_FILENAME /path/to/results.php;
fastcgi_param QUERY_STIRNG lang=en;
include fastcgi_params0;
}

location ~ ^/property-results-([0-9]+)\.php$ {
fastcgi_pass ...
fastcgi_param SCRIPT_FILENAME /path/to/results.php;
fastcgi_param QUERY_STIRNG pageindex=$1&lang=en;
include fastcgi_params0;
}

return 404;
}

location /property/ {

location ~ ^/property/([0-9]+)/(.*)\.php$ {
return http://$host/property-detail-2?propertyid=$1&lang=$2;
}

return 404;
}
hg_04, , .
, . , .
: location ~ ^/property-results-([0-9]+)\.php$ - . :
/category/properties/detail-property-results-2.php
Ϛ ^. ?

.



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


 




Copyright © Lexa Software, 1996-2009.