diff options
Diffstat (limited to 'docs/manual/mod/mod_substitute.html.en')
-rw-r--r-- | docs/manual/mod/mod_substitute.html.en | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/docs/manual/mod/mod_substitute.html.en b/docs/manual/mod/mod_substitute.html.en index 29054118..7ca0b0d8 100644 --- a/docs/manual/mod/mod_substitute.html.en +++ b/docs/manual/mod/mod_substitute.html.en @@ -9,7 +9,7 @@ <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> -<script src="../style/scripts/prettify.js" type="text/javascript"> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> </script> <link href="../images/favicon.ico" rel="shortcut icon" /></head> @@ -80,34 +80,28 @@ or regex of a subsequent one.</dd> </dl> - <div class="example"><h3>Example</h3><pre class="prettyprint lang-config"> -<Location /> + <div class="example"><h3>Example</h3><pre class="prettyprint lang-config"><Location /> AddOutputFilterByType SUBSTITUTE text/html Substitute s/foo/bar/ni -</Location> - </pre> +</Location></pre> </div> <p>If either the pattern or the substitution contain a slash character then an alternative delimiter should be used:</p> - <div class="example"><h3>Example of using an alternate delimiter</h3><pre class="prettyprint lang-config"> -<Location /> + <div class="example"><h3>Example of using an alternate delimiter</h3><pre class="prettyprint lang-config"><Location /> AddOutputFilterByType SUBSTITUTE text/html Substitute "s|<BR */?>|<br />|i" -</Location> - </pre> +</Location></pre> </div> <p>Backreferences can be used in the comparison and in the substitution, when regular expressions are used, as illustrated in the following example: </p> - <div class="example"><h3>Example of using backreferences and captures</h3><pre class="prettyprint lang-config"> -<Location /> + <div class="example"><h3>Example of using backreferences and captures</h3><pre class="prettyprint lang-config"><Location /> AddOutputFilterByType SUBSTITUTE text/html # "foo=k,bar=k" -> "foo/bar=k" Substitute "s|foo=(\w+),bar=\1|foo/bar=$1" -</Location> - </pre> +</Location></pre> </div> <p>A common use scenario for <code>mod_substitute</code> is the @@ -119,12 +113,10 @@ <p>In this case, <code>mod_substutite</code> can be used to rewrite those URLs into something that will work from the front end:</p> - <div class="example"><h3>Rewriting URLs embedded in proxied content</h3><pre class="prettyprint lang-config"> -ProxyPass /blog/ http://internal.blog.example.com + <div class="example"><h3>Rewriting URLs embedded in proxied content</h3><pre class="prettyprint lang-config">ProxyPass /blog/ http://internal.blog.example.com ProxyPassReverse /blog/ http://internal.blog.example.com/ -Substitute "s|http://internal.blog.example.com/|http://www.example.com/blog/|i" - </pre> +Substitute "s|http://internal.blog.example.com/|http://www.example.com/blog/|i"</pre> </div> <p><code class="directive"><a href="../mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code> @@ -157,7 +149,7 @@ var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_substitute.h } })(window, document); //--><!]]></script></div><div id="footer"> -<p class="apache">Copyright 2013 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="apache">Copyright 2014 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- if (typeof(prettyPrint) !== 'undefined') { prettyPrint(); |