Double Redirect

Lebod nginx-forum at forum.nginx.org
Mon Jun 20 21:59:10 UTC 2016


itpp2012 Wrote:
-------------------------------------------------------
> Lebod Wrote:
> -------------------------------------------------------
> > Thank you for the reply;
> > 
> > If we did this:
> > 
> >  server { 
> >  listen 80; 
> > -listen 443 ssl; 
> > server_name example.com ***IP Address***; 
> > return 301 https://www.example.com$request_uri; 
> >  } 
> > 
> > Wouldn't this stop https://example.com from re-directing to
> > https://www.example.com then ?
> 
> What do you think this does?:  return 301
> https://www.example.com$request_uri;


Doesn't that re-direct https://example.com to https://www.example.com ?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,267700,267738#msg-267738



More information about the nginx mailing list