domain.com and b.domain.com. Both subdomains are on different servers. I'm using nginx as my webserver. What must I change to nginx.conf to redirect all traffic from a.domain.com to b.domain.com?
Thank you!
|
domain.com and b.domain.com. Both subdomains are on different servers. I'm using nginx as my webserver. What must I change to nginx.conf to redirect all traffic from a.domain.com to b.domain.com? Thank you! |
|||
|
|
|
This question could stand to provide more details. Can we assume nginx is the httpd on both servers? What kind of configuration is already in place? This howto gives a hint which leads me to suggest this: On server
On server
|
|||
|
|
|
pjmorse's answer is good (so I upvoted it), but I use a slightly different scheme on a.domain:
This returns a HTTP 301 return code (moved permanently) instead of the 307 that some webservers may return. |
|||
|
|