А РХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev ][Date Next ][Thread Prev ][Thread Next ][Date Index ][Thread Index ]
Re: реврайт на другое домен ное имя
To : nginx-ru@xxxxxxxxx
Subject : Re: реврайт на другое домен ное имя
From : Sergey Shepelev <temotor@xxxxxxxxx >
Date: Mon, 17 Jan 2011 20:02:05 +0300
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=KuiXPFixBMBNb4DEnGOHLkcTf52ePIGnzgYcXXclKOQ=; b=QIxM03sf0lpnwuvD6ASpJ9QtFihKCbr3eLm4hAmJkkJOpnFv39aIT9ahoUF08xxs0W 33Nl91lXw2k71nEXKXc6eSqVDfDEA1KWOu5HuWvNp8c6qk+JVN+WPCnAJTLj18jzrfm9 pgKyDFWFNP9DDoaOSHwjR3AG23JIESdxMcO4M=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=w6GAqeCxEwszJ2fVw8Kzmr7nNhO9E67Oq44JZ8llPvnGxPrJRRwsNNkNRw4VXigZIq bolRU3xESv1RydSs6TKnm9htZrDK7UedYcB3JXVjlOJOPBYo/uvOdFf1MRsKFTuK2T8N hlN0Ng/O8vETPjtcv/c0P7CzoeK1w22/SOOdU=
In-reply-to: <AANLkTi=qwKu3GDPdE9jXgLQ6ZRB4w78z7akXH+NMVkE9@xxxxxxxxxxxxxx >
References: <AANLkTi=qwKu3GDPdE9jXgLQ6ZRB4w78z7akXH+NMVkE9@xxxxxxxxxxxxxx >
> 2.
> server {
> server_name www.example.com;
> rewrite (.*) http://example.com$1 ;
> }
Вдобавок можно посоветовать такой rewrite без захвата:
rewrite ^ http://example.com$request_uri permanent;
P.S.: permanent необходим для поисковиков.
+1 за редирект с www на без.
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru