1164650
如果用户没加www,如何在程序上自动加www?
如果用户没加www,如何在程序上自动加www?
自觉站在域名解析这一队了
搞不清楚www和没有www的区别
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设置的
@magicdawn 这是在解析域名里面设置的么?