关于地址自动加www的问题
      
      
      
    
    如果用户没加www,如何在程序上自动加www?
      11 回复
    
    - 为 .example.com 设置 CNAME 记录到 www.example.com
- 为 www.example.com 设置 A 记录到 ip 地址
@magicdawn 这是在解析域名里面设置的么?
vhost跳转
From KoaHub.js
@magicdawn 明白了,感谢大神们
	location / {
		# First attempt to serve request as file, then
		# as directory, then fall back to displaying a 404.
		#try_files $uri $uri/ =404;
		# Uncomment to enable naxsi on this location
		# include /etc/nginx/naxsi.rules
		if ($host != 'www.myfreax.com' ){
			rewrite  ^/(.*)$ http://www.myfreax.com/$1 permanent;
		}
		proxy_set_header   X-Real-IP $remote_addr;
		proxy_set_header   Host      $http_host;
	        proxy_pass         http://127.0.0.1:3000;
	}
我是在Nginx设置的
@huangyanxiong01 cnode也是在 nginx 做的
@alsotang 😂😂握个手
搞不清楚www和没有www的区别
自觉站在域名解析这一队了
@AserSayHi 站在域名解析一队+1 A记录 @ 暴力无脑
 
    