nginx怎么在www.a.com上把所有的请求转发到www.b.com的机器上呢?
答:
server {
listen 80;
listen [::]:80;
server_name www.a.com;
return 301 http://www.b.com/www.a.com$request_uri;
}
nginx怎么在www.a.com上把所有的请求转发到www.b.com的机器上呢?
答:
server {
listen 80;
listen [::]:80;
server_name www.a.com;
return 301 http://www.b.com/www.a.com$request_uri;
}