Configure nginx to reverse proxy a single url, and issue 301 redirects to everything else
Posted
by
Martin
on Server Fault
See other posts from Server Fault
or by Martin
Published on 2011-01-14T01:55:16Z
Indexed on
2011/01/14
2:55 UTC
Read the original article
Hit count: 346
I am using nginx to issue redirects for a domain we are changing, but one of our old mobile apps becomes broken by this redirect when it issues one specific POST request to the old domain.
Here is the current nginx configuration, how could I add a reverse proxy to perform a POST to the URL /post_url and redirect everything else the same as now?
server {
listen 80;
server_name olddomain.com www.olddomain.com;
rewrite ^(.*) http://www.newdomain.com$1 permanent;
}
© Server Fault or respective owner