2011年2月17日星期四

Re: remove www from the url

edogawaconan Wrote:
-------------------------------------------------------
> If I remember correctly:
>
> server {
> server_name www.mysite.com;
> rewrite ^ $schema://mysite.com$request_uri
> permanent;
> }

Good memory. Not "$schema" though, but "$scheme"

[code]
server {
server_name www.mysite.com;
rewrite ^ $scheme://mysite.com$request_uri permanent;
}
server {
server_name mysite.com;
...
}
[/code]

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,176137,176144#msg-176144


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

没有评论:

发表评论