Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rewrite из apache в nginx
- To: nginx-ru@xxxxxxxxx
- Subject: Re: rewrite из apache в nginx
- From: Vasiliy G Tolstov <v.tolstov@xxxxxxxxx>
- Date: Wed, 30 Jan 2008 12:45:29 +0300
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=myselector; d=selfip.ru; h=Received:Received:Message-ID:Date:From:Reply-To:Organization:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:X-DSPAM-Result:X-DSPAM-Processed:X-DSPAM-Confidence:X-DSPAM-Improbability:X-DSPAM-Probability:X-DSPAM-Signature:X-DSPAM-Factors; b=ffek+brbSjgTYgTwXS+DR56juz7ocNfHO4Z85f/vLpNBgPbmHlxqgLVaD/si9Rm2DkL5guyNXb6XeRitpSgFHPAZrFumjtuoAkdU229VdiEWV28mOr5IteWKK4ceY2n86LV2h3B14SrCFmT9IX2piFKj4GHBSHJI7Um+s9UoLOQ=;
- In-reply-to: <1117.78.107.176.111.1201640763.squirrel@xxxxxxxxxxxxxx>
- Organization: Selfip.Ru
- References: <1117.78.107.176.111.1201640763.squirrel@xxxxxxxxxxxxxx>
Vasiliy G Tolstov wrote:
Возникла проблема с переделкой rewrite правил из apache в nginx
RewriteRule ^(.*)/$ index.php?url_path=$1
RewriteRule ^(.*)/([0-9]+)$ index.php?url_path=$1&page=$2
RewriteRule ^(.*)/([0-9]+).html$ info.php?url_path=$1&ads_id=$2
RewriteRule ^([A-Za-z0-9_]+)$ index.php?city_filename=$1&set_city_id=1
Первое переделал в
location / {
rewrite ^/(.*)/$ index.php?url_path=$1 last;
}
А вот как с остальными, не получается =(. Кто нибудь может помочь?
--
Что-то долго шло сообщение.. Спасибо , решение уже найдено.
location / {
rewrite ^/(.*)/$ /index.php?url_path=$1 last;
rewrite ^/(.*)/([0-9]+)$ /index.php?url_path=$1&page=$2 last;
rewrite ^/(.*)/([0-9]+).html$ /info.php?url_path=$1&ads_id=$2 last;
rewrite ^/([A-Za-z0-9_]+)$ /index.php?city_filename=$1&set_city_id=1
last;
break;
}
--
С уважением, Vasiliy G Tolstov
http://www.selfip.ru
begin:vcard
fn:Vasiliy G Tolstov
n:Tolstov;Vasiliy
org:PeterHost.Ru;Virtual Hosting
adr:;;Professora Popova str.;Saint-Petersbutg;;;Russia
email;internet:v.tolstov@xxxxxxxxx
title:System Administrator
tel;work:+78123477743
tel;cell:+79119940054
x-mozilla-html:TRUE
url:http://www.selfip.ru
version:2.1
end:vcard
|