diff xml/en/docs/http/ngx_http_sub_module.xml @ 348:5a848934a12d

English translation of ngx_http_geoip_module, ngx_http_map_module, ngx_http_realip_module, ngx_http_secure_link_module, ngx_http_split_clients_module, and ngx_http_sub_module.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 23 Jan 2012 16:50:35 +0000
parents
children 694db9597ee0
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xml/en/docs/http/ngx_http_sub_module.xml	Mon Jan 23 16:50:35 2012 +0000
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
+
+<module name="Module ngx_http_sub_module"
+        link="/en/docs/http/ngx_http_sub_module.html"
+        lang="en">
+
+<section id="summary">
+
+<para>
+The <literal>ngx_http_sub_module</literal> module is a filter
+that modifies a response by replacing one specified string by another.
+</para>
+
+<para>
+This module is not built by default, it should be enabled with the
+<literal>--with-http_sub_module</literal>
+configuration parameter.
+</para>
+
+</section>
+
+
+<section id="example" name="Example Configuration">
+
+<para>
+<example>
+location / {
+    sub_filter      &lt;/head&gt;
+        '&lt;/head&gt;&lt;script language="javascript" src="$script"&gt;&lt;/script&gt;';
+    sub_filter_once on;
+}
+</example>
+</para>
+
+</section>
+
+
+<section id="directives" name="Directives">
+
+<directive name="sub_filter">
+<syntax><value>string</value> <value>replacement</value></syntax>
+<default/>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+
+<para>
+Sets a string that needs to be changed, and a replacement string.
+The string to be replaced is matched ignoring the case.
+A replacement string can contain variables.
+</para>
+
+</directive>
+
+
+<directive name="sub_filter_once">
+<syntax><literal>on</literal> | <literal>off</literal></syntax>
+<default>on</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+
+<para>
+Determines how many times to look for a string to be replaced,
+once or several times.
+</para>
+
+</directive>
+
+
+<directive name="sub_filter_types">
+<syntax><value>mime-type</value> ...</syntax>
+<default>text/html</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+
+<para>
+Enables string replacement in responses with the specified MIME types
+in addition to “<literal>text/html</literal>”.
+</para>
+
+</directive>
+
+</section>
+
+</module>