remove www from the url

Edho P Arief edhoprima at gmail.com
Thu Feb 17 17:47:11 MSK 2011


On Thu, Feb 17, 2011 at 9:44 PM, whiskybar <nginx-forum at nginx.us> wrote:
> Why is that and more importantly, what trick should I use to redirect
> www.mysite.com --> mysite.com?
>

If I remember correctly:

server {
  server_name www.mysite.com;
  rewrite ^ $schema://mysite.com$request_uri permanent;
}



More information about the nginx mailing list