Hi,
Currently have the following url,
https://old.example.com/test/place?id=1
https://old.example.com/test/place?id=2
https://old.example.com/test/place?id=3
Need to redirect only id=2 to another url.
Did the following and it works for id=2. Need id=1 and id=3 to continue
normally without change.
location = /test/place {
if ($args = "id=2") {
return 301 https://new.example.com/test/place?$args;
}
}
Or is there a way to do the following? That would be ideal.
location = /test/place?id=2 {
return 301 https://new.example.com/test/place?id=2
}
Unfortunately the above does not work. What is missing?
--
P.V.Anthony
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx