When you
But there is tiny tip here that needs to be told. If you want to pass parameter to the destination link, which in here is
The variable
#nginx #web_server #redirect #302 #is_args #args
redirect
in nginX
you would use one of 302, 301 code like the below code:location = /singup {
return 302 https://docs.google.com/forms;
}
But there is tiny tip here that needs to be told. If you want to pass parameter to the destination link, which in here is
https:// docs.google.com/forms
it wont work. String parameters are being held in $args
varaible in nginX
so you need to pass this variable like the following code:location = /singup {
return 302 https://docs.google.com/forms$is_args$args;
}
The variable
$is_args
value will be set to "?" if a request line has arguments, or an empty string otherwise.#nginx #web_server #redirect #302 #is_args #args