rewrite regex replacement [flag];
flag=【break/last/redirect/permanent】
² regex is a regular expression
² replacement is the replacement value, the new value
² flag - subsequent processing identification
flag=break
Occurred nginx internal redirect, path value is updated, rewrite level of command will be interrupted. The original control flow logic unchanged go down
flag=last
Occurred nginx internal redirect, path value is updated, rewrite level of command will be interrupted. Refresh control flow, the entire re- location logic flow layer.
flag= redirect/permanent
Occurrence page redirects ( 301 permanent redirect / 302 temporary redirect), nginx process ends and returns http response to the browser, the page url update
flag is empty
Occurred nginx internal redirect, path value is updated, rewrite level command to continue. Finally, a rewrite is completed, the refresh control processes, re- location re-match