Using nginx 1.8.1 on CentOS Linux, I am attempting to do the following:Redirect traffic from server_name server1.olddomain.com; to server2.newdomain.comIn doing so, remove sites from the path.For example, a modified snippet from nginx.conf.server {   ...   server_name server1.olddomain.com;   ...   location /sites/ITDept {        rewrite ^(.*) https://server2.newdomain.com/ITDept;}While this does work as expected for the exact rule above, anything else does not work.  https://server1.olddomain.com/sites/ITDept/subfolder/subfolder does not redirect as desired as https://server2.newdomain.com/ITDept/subfolder/subfolder.  It redirects to https://server2.newdomain.com/sites/ITDept/subfolder/subfolder.I've spent hours trying to figure out the correct syntax without success.  I hope that there is someone that can be of assistance. Thank you in advance.
How to redirect path using nginx while removing part of the path
nginx;reverse proxy