How do I rewrite URIs of the form http://domain1/one/two?three=four to http://domain2?path=http%3A%2F%2Fdomain1%2Fone%2Ftwo%3Fthree%3Dfour using nginx?