folks!
We have following http request:
http://example.com/foo?redirect_uri=http%3A%2F%2Fexample.com%2Fbar
We want to replace redirect_uri
from "example.com" to "example.net".
How to do it?
Thanks
You need to do it like this
location /foo {
if ($args ~* "(.*)(example\.com)(.*)") {
set $args "$1example.net$3";
return 301 $scheme://$host$uri$is_args$args;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With