Hi All,
I'm new to the forum and new to NGINX and trying to get all my old Apache settings to work ...
I have the following issue: I want to use a map to rewrite the uri but I don't want it to (visually) redirect.
These lines all work, but I don't want to see the redirect.
if ($new) {
# return 301 \?$new;
# rewrite ^ /?$new? redirect;
rewrite ^ /?$new? permanent;
}
For some reason I can not get this to work:
if ($new) {
# rewrite ^ /?$new? last;
rewrite ^ /?$new? break;
# rewrite ^(.*) /?$new? last;
}
I have searched for hours but can not find or understand the solution. Any helpwould be greatly appreciated!!
Thanks.