• 替换 http 内容
  • --with-http_sub_module

指令

  • sub_filter | Syntax: | **sub_filter**string`_replacement_;| | :--- | --- | | Default: | — | | Context: |http,server,location` |
  • sub_filter_once | Syntax: | **sub_filter_once**on|off; | | :—- | —- | | Default: | sub_filter_once on; | | Context: | http, server, location | | Desc: | 默认 on 只替换一次值 |
  • sub_filter_last_modified | Syntax: | **sub_filter_last_modified**on|off; | | :—- | —- | | Default: | sub_filter_last_modified off; | | Context: | http, server, location | | Desc: | 可以配合 cache |

This directive appeared in version 1.5.1.

  • sub_filter_types | Syntax: | **sub_filter_types**mime-type...; | | :—- | —- | | Default: | sub_filter_types text/html; | | Context: | http, server, location |