Home >Backend Development >PHP Tutorial >nginx rewite command module
Introduction: nginx, as a reverse proxy server, sometimes needs to modify the uri in the http request;
nginx rewrite module contains instructions
nginx rewrite Module Introduction
The ngx_http_rewrite_module module is used to change request URI using regular expressions, return redirects, and conditionally select configurations.
mainly includes three methods,regular expressionschange uri, directly return jump 301, 302, return 404, 501 errors; modify uri according to conditions;
nginx rewrite module instructions execution sequence
The instructions of this module can appear under server/location, and of course in the if block;
tag of rewrite directive
<code><span>Syntax</span>: <span>rewrite regex replacement [flag];</span><span>Default</span>: <span> —</span><span>Context</span>: <span> server, location, if</span></code>
These four flags are not necessary. If [flag] is missing, the order will be executed downwards;
Flowchart
').addClass ('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });The above introduces the nginx rewite command module, including regular expressions. I hope it will be helpful to friends who are interested in PHP tutorials.