httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbo...@apache.org
Subject svn commit: r935537 - in /httpd/httpd/trunk/docs/manual/rewrite: avoid.html.en avoid.xml
Date Mon, 19 Apr 2010 11:53:38 GMT
Author: rbowen
Date: Mon Apr 19 11:53:38 2010
New Revision: 935537

URL: http://svn.apache.org/viewvc?rev=935537&view=rev
Log:
starting back on some of the things I want to add to the rewrite docs.

Modified:
    httpd/httpd/trunk/docs/manual/rewrite/avoid.html.en
    httpd/httpd/trunk/docs/manual/rewrite/avoid.xml

Modified: httpd/httpd/trunk/docs/manual/rewrite/avoid.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/rewrite/avoid.html.en?rev=935537&r1=935536&r2=935537&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/rewrite/avoid.html.en (original)
+++ httpd/httpd/trunk/docs/manual/rewrite/avoid.html.en Mon Apr 19 11:53:38 2010
@@ -38,16 +38,95 @@ particular server configuration, so it's
 them, rather than merely cutting and pasting the examples into your
 configuration.</p>
 
+<div class="warning">This document is a work in progress.</div>
+
 </div>
-<div id="quickview"><h3>See also</h3><ul class="seealso"><li><a
href="../mod/mod_rewrite.html">Module documentation</a></li><li><a
href="intro.html">mod_rewrite introduction</a></li><li><a href="remapping.html">Redirection
and remapping</a></li><li><a href="access.html">Controlling access</a></li><li><a
href="vhosts.html">Virtual hosts</a></li><li><a href="proxy.html">Proxying</a></li><li><a
href="advanced.html">Advanced techniques and tricks</a></li></ul></div>
+<div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif"
/> <a href="#redirect">Simple Redirection</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#alias">URL Aliasing</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#vhosts">Virtual Hosting</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#proxy">Simple Proxying</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#setenv">Environment
Variable Testing</a></li>
+</ul><h3>See also</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">Module
documentation</a></li><li><a href="intro.html">mod_rewrite introduction</a></li><li><a
href="remapping.html">Redirection and remapping</a></li><li><a href="access.html">Controlling
access</a></li><li><a href="vhosts.html">Virtual hosts</a></li><li><a
href="proxy.html">Proxying</a></li><li><a href="advanced.html">Advanced
techniques and tricks</a></li></ul></div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"
/></a></div>
 <div class="section">
-<h2><a name="coming" id="coming">Coming Soon ...</a></h2>
+<h2><a name="redirect" id="redirect">Simple Redirection</a></h2>
+
+
+<p><code class="module"><a href="../mod/mod_alias.html">mod_alias</a></code>
provides the <code class="directive"><a href="../mod/mod_alias.html#redirect">Redirect</a></code>
and <code class="directive"><a href="../mod/mod_alias.html#redirectmatch">RedirectMatch</a></code>
directives, which provide a
+means to redirect one URL to another. This kind of simple redirection of
+one URL, or a class of URLs, to somewhere else, should be accomplished
+using these directives rather than <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>.
<code>RedirectMatch</code>
+allows you to include a regular expression in your redirection criteria,
+providing many of the benefits of using <code>RewriteRule</code>.</p>
+
+<p>A common use for <code>RewriteRule</code> is to redirect an entire
+class of URLs. For example, all URLs in the <code>/one</code> directory
+must be redirected to <code>http://one.example.com/</code>, or perhaps
+all <code>http</code> requests must be redirected to
+<code>https</code>.</p>
+
+<p>These situations are better handled by the <code>Redirect</code>
+directive. Remember that <code>Redirect</code> preserves path
+information. That is to say, a redirect for a URL <code>/one</code> will
+also redirect all URLs under that, such as <code>/one/two.html</code>
+and <code>/one/three/four.html</code>.</p>
+
+<p>To redirect URLs under <code>/one</code> to
+<code>http://one.example.com</code>, do the following:</p>
+
+<div class="example"><p><code>
+Redirect /one/ http://one.example.com/
+</code></p></div>
+
+<p>To redirect <code>http</code> URLs to <code>https</code>,
do the
+following:</p>
+
+<div class="example"><p><code>
+&lt;VirtualHost *:80&gt;
+ServerName www.example.com<br />
+Redirect / https://www.example.com/<br />
+&lt;/VirtualHost &gt;
+<br />
+&lt;VirtualHost *:443&gt;
+ServerName www.example.com<br />
+<br />
+# ... SSL configuration goes here<br />
+&lt;/VirtualHost &gt;
+</code></p></div>
+
+<p>The use of <code>RewriteRule</code> to perform this task may be
+appropriate if there are other <code>RewriteRule</code> directives in
+the same scope. This is because, when there are <code>Redirect</code>
+and <code>RewriteRule</code> directives in the same scope, the
+<code>RewriteRule</code> directives will run first, regardless of the
+order of appearance in the configuration file.</p>
+
+<p>In the case of the <em>http-to-https</em> redirection, the use of
+<code>RewriteRule</code> would be appropriate if you don't have access
+to the main server configuration file, and are obliged to perform this
+task in a <code>.htaccess</code> file instead.</p>
+
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"
/></a></div>
+<div class="section">
+<h2><a name="alias" id="alias">URL Aliasing</a></h2>
+<p>Using Alias</p>
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"
/></a></div>
+<div class="section">
+<h2><a name="vhosts" id="vhosts">Virtual Hosting</a></h2>
+<p>Virtual Hosts</p>
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"
/></a></div>
+<div class="section">
+<h2><a name="proxy" id="proxy">Simple Proxying</a></h2>
+<p>ProxyPass</p>
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"
/></a></div>
+<div class="section">
+<h2><a name="setenv" id="setenv">Environment Variable Testing</a></h2>
+
+<div class="note">Parts of this section are applicable only to Apache HTTP 
+Server 2.3 and later.</div>
 
+<p>Using SetEnvIf and &lt;If&gt; (2.3 and later.)</p>
 
-<p>
-This document currently being written.
-</p>
 </div></div>
 <div class="bottomlang">
 <p><span>Available Languages: </span><a href="../en/rewrite/avoid.html"
title="English">&nbsp;en&nbsp;</a></p>

Modified: httpd/httpd/trunk/docs/manual/rewrite/avoid.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/rewrite/avoid.xml?rev=935537&r1=935536&r2=935537&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/rewrite/avoid.xml (original)
+++ httpd/httpd/trunk/docs/manual/rewrite/avoid.xml Mon Apr 19 11:53:38 2010
@@ -43,6 +43,8 @@ particular server configuration, so it's
 them, rather than merely cutting and pasting the examples into your
 configuration.</p>
 
+<note type="warning">This document is a work in progress.</note>
+
 </summary>
 <seealso><a href="../mod/mod_rewrite.html">Module documentation</a></seealso>
 <seealso><a href="intro.html">mod_rewrite introduction</a></seealso>
@@ -53,12 +55,88 @@ configuration.</p>
 <seealso><a href="advanced.html">Advanced techniques and tricks</a></seealso>
 <!--<seealso><a href="avoid.html">When not to use mod_rewrite</a></seealso>-->
 
-<section id="coming">
+<section id="redirect">
+<title>Simple Redirection</title>
+
+<p><module>mod_alias</module> provides the <directive
+module="mod_alias">Redirect</directive> and <directive
+module="mod_alias">RedirectMatch</directive> directives, which provide a
+means to redirect one URL to another. This kind of simple redirection of
+one URL, or a class of URLs, to somewhere else, should be accomplished
+using these directives rather than <directive
+module="mod_rewrite">RewriteRule</directive>. <code>RedirectMatch</code>
+allows you to include a regular expression in your redirection criteria,
+providing many of the benefits of using <code>RewriteRule</code>.</p>
+
+<p>A common use for <code>RewriteRule</code> is to redirect an entire
+class of URLs. For example, all URLs in the <code>/one</code> directory
+must be redirected to <code>http://one.example.com/</code>, or perhaps
+all <code>http</code> requests must be redirected to
+<code>https</code>.</p>
+
+<p>These situations are better handled by the <code>Redirect</code>
+directive. Remember that <code>Redirect</code> preserves path
+information. That is to say, a redirect for a URL <code>/one</code> will
+also redirect all URLs under that, such as <code>/one/two.html</code>
+and <code>/one/three/four.html</code>.</p>
+
+<p>To redirect URLs under <code>/one</code> to
+<code>http://one.example.com</code>, do the following:</p>
+
+<example>
+Redirect /one/ http://one.example.com/
+</example>
+
+<p>To redirect <code>http</code> URLs to <code>https</code>,
do the
+following:</p>
+
+<example>
+&lt;VirtualHost *:80&gt;
+ServerName www.example.com<br />
+Redirect / https://www.example.com/<br />
+&lt;/VirtualHost &gt;
+<br />
+&lt;VirtualHost *:443&gt;
+ServerName www.example.com<br />
+<br />
+# ... SSL configuration goes here<br />
+&lt;/VirtualHost &gt;
+</example>
+
+<p>The use of <code>RewriteRule</code> to perform this task may be
+appropriate if there are other <code>RewriteRule</code> directives in
+the same scope. This is because, when there are <code>Redirect</code>
+and <code>RewriteRule</code> directives in the same scope, the
+<code>RewriteRule</code> directives will run first, regardless of the
+order of appearance in the configuration file.</p>
+
+<p>In the case of the <em>http-to-https</em> redirection, the use of
+<code>RewriteRule</code> would be appropriate if you don't have access
+to the main server configuration file, and are obliged to perform this
+task in a <code>.htaccess</code> file instead.</p>
+
+</section>
+
+<section id="alias"><title>URL Aliasing</title>
+<p>Using Alias</p>
+</section>
+
+<section id="vhosts"><title>Virtual Hosting</title>
+<p>Virtual Hosts</p>
+</section>
+
+<section id="proxy"><title>Simple Proxying</title>
+<p>ProxyPass</p>
+</section>
+
+<section id="setenv"><title>Environment Variable Testing</title>
+
+<note type="note">Parts of this section are applicable only to Apache HTTP 
+Server 2.3 and later.</note>
+
+<p>Using SetEnvIf and &lt;If&gt; (2.3 and later.)</p>
 
-<title>Coming Soon ...</title>
-<p>
-This document currently being written.
-</p>
 </section>
 
 </manualpage> 
+



Mime
View raw message