Welcome! Log In Create A New Profile

Advanced

Re: Здравствуйте!

Gena Makhomed
June 18, 2010 10:32AM
On 18.06.2010 16:53, server801 wrote:

> Как сделать редирект при
> обращении к http://site.com на http://www.site.com ?
> Вот конфиг

> server {
> listen 80;
> server_name site.com www.site.com;

здесь надо оставить только

server_name www.site.com;

и рядом создать другой server:

server {
listen 80;
server_name site.com;
rewrite ^ http://www.site.com$request_uri? permanent;
}

--
Best regards,
Gena


_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

Здравствуйте!

server801 June 18, 2010 09:53AM

Re: Здравствуйте!

vgoncharov June 18, 2010 10:26AM

Re: Здравствуйте!

Gena Makhomed June 18, 2010 10:32AM

Re: Здравствуйте!

server801 June 18, 2010 10:49AM

Re: Редирект на www

server801 June 18, 2010 10:56AM

Re: Здравствуйте!

Igor Sysoev June 18, 2010 11:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 42
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready