diff options
Diffstat (limited to 'docs/manual/rewrite/avoid.html.en')
-rw-r--r-- | docs/manual/rewrite/avoid.html.en | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/docs/manual/rewrite/avoid.html.en b/docs/manual/rewrite/avoid.html.en index 5d76ed97..f50908cd 100644 --- a/docs/manual/rewrite/avoid.html.en +++ b/docs/manual/rewrite/avoid.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> @@ -90,8 +90,7 @@ and <code>/one/three/four.html</code>.</p> <p>To redirect <code>http</code> URLs to <code>https</code>, do the following:</p> -<pre class="prettyprint lang-config"> -<VirtualHost *:80> +<pre class="prettyprint lang-config"><VirtualHost *:80> ServerName www.example.com Redirect / https://www.example.com/ </VirtualHost > @@ -99,8 +98,7 @@ following:</p> <VirtualHost *:443> ServerName www.example.com # ... SSL configuration goes here -</VirtualHost > -</pre> +</VirtualHost ></pre> <p>The use of <code>RewriteRule</code> to perform this task may be @@ -166,27 +164,21 @@ seems like the right approach.</p> <p><code>RewriteRule</code> provides the <a href="flags.html#flag_p">[P]</a> flag to pass rewritten URIs through <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>.</p> -<pre class="prettyprint lang-config"> -RewriteRule ^/?images(.*) http://imageserver.local/images$1 [P] -</pre> +<pre class="prettyprint lang-config">RewriteRule ^/?images(.*) http://imageserver.local/images$1 [P]</pre> <p>However, in many cases, when there is no actual pattern matching needed, as in the example shown above, the <code class="directive"><a href="../mod/mod_proxy.html#proxypass">ProxyPass</a></code> directive is a better choice. The example here could be rendered as:</p> -<pre class="prettyprint lang-config"> -ProxyPass /images/ http://imageserver.local/images/ -</pre> +<pre class="prettyprint lang-config">ProxyPass /images/ http://imageserver.local/images/</pre> <p>Note that whether you use <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> or <code class="directive"><a href="../mod/mod_proxy.html#proxypass">ProxyPass</a></code>, you'll still need to use the <code class="directive"><a href="../mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code> directive to catch redirects issued from the back-end server:</p> -<pre class="prettyprint lang-config"> -ProxyPassReverse /images/ http://imageserver.local/images/ -</pre> +<pre class="prettyprint lang-config">ProxyPassReverse /images/ http://imageserver.local/images/</pre> <p>You may need to use <code>RewriteRule</code> instead when there are @@ -209,11 +201,9 @@ variable or request header. This can be done more efficiently using the hostname, such as <code>www.example.com</code> instead of <code>example.com</code>. This can be done using the <code class="directive"><a href="../mod/core.html#if"><If></a></code> directive, as shown here:</p> -<pre class="prettyprint lang-config"> -<If "req('Host') != 'www.example.com'"> +<pre class="prettyprint lang-config"><If "req('Host') != 'www.example.com'"> Redirect / http://www.example.com/ -</If> -</pre> +</If></pre> <p>This technique can be used to take actions based on any request @@ -246,7 +236,7 @@ var comments_identifier = 'http://httpd.apache.org/docs/2.4/rewrite/avoid.html'; } })(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(); |