How do you determine when to use $request_uri
vs $uri
?
According to NGINX documentation, $request_uri
is the original request (for example, /foo/bar.php?arg=baz
includes arguments and can't be modified) but $uri
refers to the altered URI.
If the URI doesn't change, does $uri = $request_uri?
Would it be incorrect or better or worse to use:
map $uri $new_uri {
# do something
}
vs
map $request_uri $new_uri {
# do something
}