ngnix:
server{
listen 80 default;(必须有default,且只能有这一个)
server_name _;
1.return 500;
or
2.rewrite ^(.*)/$ http://www.cai.com/$1 permanent;
}
apache:
<VirtualHost *:80>
ServerName 23.23.12.32(这个是服务器主机的ip)
Redirect 301 / http://www.cai.com
</VirtualHost>