2011年2月17日星期四

Re: remove www from the url

On Thu, Feb 17, 2011 at 9:44 PM, whiskybar <nginx-forum@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;
}

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

没有评论:

发表评论