Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tricky configuration rewrite rules (Symfony+FastCGI+Cache)
- To: nginx-ru@xxxxxxxxx
- Subject: Re: Tricky configuration rewrite rules (Symfony+FastCGI+Cache)
- From: Anton Yuzhaninov <citrin@xxxxxxxxx>
- Date: Wed, 11 Jul 2012 18:36:07 +0400
- In-reply-to: <CAFrGiLR-OY5oDeM5atjrPHGtaBLHzEkx=ds7oY0Z8UHTTkqB8g@mail.gmail.com>
- References: <CAFrGiLR-OY5oDeM5atjrPHGtaBLHzEkx=ds7oY0Z8UHTTkqB8g@mail.gmail.com>
On 07/11/12 18:23, Valery N. wrote:
Будьте добры, помогите разобраться в ситуации. Мой конфиг залит на
pastebin:http://pastebin.com/GurMXw1b
Совет не по теме вопроса.
Вместо конструкции вида:
if ($host = 'gomel.map.by' ) {
rewrite ^/(.*)$ http://map.by/%D0%93%D0%BE%D0%BC%D0%B5%D0%BB%D1%8C$1
permanent;
}
лучше написать отдельный блок server {}
server {
server_name gomel.map.by;
location ^/(.*)$ {
return 301 "http://map.by/%D0%93%D0%BE%D0%BC%D0%B5%D0%BB%D1%8C$1";
}
}
--
Anton Yuzhaninov
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru
|