Welcome! Log In Create A New Profile

Advanced

Redirect problem

January 24, 2015 12:07AM
I've a problem with a redirect http https and using non-www

Can you tell me what is wrong? sometimes i have redirect loop.

server {
listen 80;
listen [::1]:80;
server_name domain.com;
return 301 https://www.domain.com$request_uri;
}

server {
listen 80;
listen [::1]:80;
server_name www.domain.com;
return 301 https://www.domain.com$request_uri;
}


server {
listen 443 ssl spdy;
listen [::1]:443 ssl spdy;
server_name www.domain.com;
......
}

Thanks.
Subject Author Posted

Redirect problem

Kurogane January 24, 2015 12:07AM

Re: Redirect problem

Francis Daly January 24, 2015 08:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 72
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