if exist ?, before ? can rewrite path, after ? can rewrite query, if before ? is empty, then path will not change, but if after ? is empty, then rewrite query to empty. example http://example.com/abc/?def=3 :
rewrite rule: ?cd=2
get : http://example.com/abc/?cd=2 (path not change, only change query)
rewrite rule: ?
get : http://example.com/abc (path not change, query is empty)
rewrite rule: /mn?cd=2
get : http://example.com/mn?cd=2 (path and query change)
if not exist ?, default is rewrite path, and query will not change, example http://example.com/abc/?def=3 :
rewrite rule: /mn
get : http://example.com/mn/?def=3 (path change, query not change)
if use {path} or {query}, and append some params before or after their, it worked , but if use {uri}, only before {url} part can work , after {url} part will ignore, so my &jscode=asdf is not work. example http://example.com/abc/?def=3 :
rewrite rule: /mn{path}/op
get : http://example.com/mn/abc/op?def=3 (path before and after change)
rewrite rule: ?mn/{query}/op
get : http://example.com/abc/?mn/def=3/op (query before and after change)
rewrite rule: mn/{uri}/op
get : http://example.com/mn/abc/?def=3 (uri only before part change)