引言:nginx作為反向代理伺服器, 有時候需要修改http請求中的uri;
nginx rewrite模組包含的指令
正則變回404、501錯誤; 根據條件修改uri;
nginx rewrite模組指令的執行順序該模組的指令可以出現在server/location下面,當然還有if區塊中;
the directives of this module specified on the server level are executed sequentially;repeatedly:<code><span>Syntax</span>: <span>rewrite regex replacement [flag];</span><span>Default</span>: <span> —</span><span>Context</span>: <span> server, location, if</span></code>
redirect; returns a temporary redirect with the 302 code; used if a replacement string dohttpses
').text(i)); }; $numbering.fadeIn(1700); }); });
以上就介紹了nginx rewite指令模組,包含了正規表示式方面的內容,希望對PHP教學有興趣的朋友有所幫助。