> Classic "redirect everything" example contains
> '?'. See e.g. here:
>
> http://nginx.org/en/docs/http/converting_rewrite_rules.html
>
> : server {
> : listen 80;
> : server_name nginx.org;
> : rewrite ^ http://www.nginx.org$request_uri?;
> : }
Well, it sure does. http://wiki.nginx.org/Pitfalls#Taxing_Rewrites does not show the '?' and I (think) I've read many other configurations that don't have it, but perhaps I'm just getting old.
> rewrite is expected to preserve original args in
> all cases (either
> preserve as is, or append if you added other
> arguments) unless you
> specified trailing '?'.
Got it. However, if you use $request_uri, doesn't that always preserve the original args by itself? I'm having trouble thinking of an example where you would NOT want a question mark after $request_uri in a rewrite statement.
Thanks!
--
Ron