]> granicus.if.org Git - apache/commitdiff
Moving yet another recipe. Almost done with this exercise.
authorRich Bowen <rbowen@apache.org>
Tue, 17 Nov 2009 01:56:34 +0000 (01:56 +0000)
committerRich Bowen <rbowen@apache.org>
Tue, 17 Nov 2009 01:56:34 +0000 (01:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@881091 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/rewrite/remapping.html.en
docs/manual/rewrite/remapping.xml
docs/manual/rewrite/rewrite_guide.html.en
docs/manual/rewrite/rewrite_guide.xml

index a788f5e48977b3ee384c763f5d714c8e486db72a..452c9ae8dc8236005d5f78d648e776e32463e0c3 100644 (file)
@@ -45,6 +45,7 @@ configuration.</div>
 <li><img alt="" src="../images/down.gif" /> <a href="#browser-dependent-content">Browser Dependent Content</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#canonicalurl">Canonical URLs</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#uservhosts">Virtual Hosts Per User</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#moveddocroot">Moved <code>DocumentRoot</code></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="access.html">Controlling access</a></li><li><a href="advanced.html">Advanced techniques and tricks</a></li><li><a href="avoid.html">When not to use mod_rewrite</a></li></ul></div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="section">
@@ -537,6 +538,53 @@ dynamic content, and Alias resolution.
     </dd>
   </dl>
 
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="moveddocroot" id="moveddocroot">Moved <code>DocumentRoot</code></a></h2>
+
+  
+
+  <dl>
+    <dt>Description:</dt>
+
+    <dd>
+<p>Usually the <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>
+of the webserver directly relates to the URL "<code>/</code>".
+But often this data is not really of top-level priority. For example,
+you may wish for visitors, on first entering a site, to go to a
+particular subdirectory <code>/about/</code>. This may be accomplished
+using the following ruleset:</p>
+</dd>
+
+    <dt>Solution:</dt>
+
+    <dd>
+      <p>We redirect the URL <code>/</code> to
+      <code>/about/</code>:
+      </p>
+     
+<div class="example"><pre>
+RewriteEngine on
+RewriteRule   <strong>^/$</strong>  /about/  [<strong>R</strong>]
+</pre></div>
+
+<p>Note that this can also be handled using the <code class="directive"><a href="../mod/mod_alias.html#redirectmatch">RedirectMatch</a></code> directive:</p>
+
+<div class="example"><p><code>
+RedirectMatch ^/$ http://example.com/about/
+</code></p></div>
+
+<p>Note also that the example rewrites only the root URL. That is, it
+rewrites a request for <code>http://example.com/</code>, but not a
+request for <code>http://example.com/page.html</code>. If you have in 
+fact changed your document root - that is, if <strong>all</strong> of 
+your content is in fact in that subdirectory, it is greatly preferable 
+to simply change your <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>
+directive, or move all of the content up one directory,
+rather than rewriting URLs.</p>
+</dd>
+</dl>
+
 </div></div>
 <div class="bottomlang">
 <p><span>Available Languages: </span><a href="../en/rewrite/remapping.html" title="English">&nbsp;en&nbsp;</a></p>
index fd1374eb32fb37747a96cbcb6043c1791f04cec9..a1e48e74ccfe9e6028a36dce0dfe911ce4e16933 100644 (file)
@@ -543,8 +543,52 @@ dynamic content, and Alias resolution.
 
 </section>
 
+<section id="moveddocroot">
 
+  <title>Moved <code>DocumentRoot</code></title>
 
+  <dl>
+    <dt>Description:</dt>
+
+    <dd>
+<p>Usually the <directive module="core">DocumentRoot</directive>
+of the webserver directly relates to the URL "<code>/</code>".
+But often this data is not really of top-level priority. For example,
+you may wish for visitors, on first entering a site, to go to a
+particular subdirectory <code>/about/</code>. This may be accomplished
+using the following ruleset:</p>
+</dd>
+
+    <dt>Solution:</dt>
 
+    <dd>
+      <p>We redirect the URL <code>/</code> to
+      <code>/about/</code>:
+      </p>
+     
+<example><pre>
+RewriteEngine on
+RewriteRule   <strong>^/$</strong>  /about/  [<strong>R</strong>]
+</pre></example>
+
+<p>Note that this can also be handled using the <directive
+module="mod_alias">RedirectMatch</directive> directive:</p>
+
+<example>
+RedirectMatch ^/$ http://example.com/about/
+</example>
+
+<p>Note also that the example rewrites only the root URL. That is, it
+rewrites a request for <code>http://example.com/</code>, but not a
+request for <code>http://example.com/page.html</code>. If you have in 
+fact changed your document root - that is, if <strong>all</strong> of 
+your content is in fact in that subdirectory, it is greatly preferable 
+to simply change your <directive module="core">DocumentRoot</directive>
+directive, or move all of the content up one directory,
+rather than rewriting URLs.</p>
+</dd>
+</dl>
+
+</section>
 
 </manualpage> 
index 73095f0a42d1e2f5fed10992ee009bbe1da4402a..353e2801b57b22e02a0782757f1c8b5ca9f7e789 100644 (file)
@@ -41,8 +41,7 @@
     avoids many problems.</div>
 
   </div>
-<div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#moveddocroot">Moved <code>DocumentRoot</code></a></li>
-<li><img alt="" src="../images/down.gif" /> <a href="#trailingslash">Trailing Slash Problem</a></li>
+<div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#trailingslash">Trailing Slash Problem</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#setenvvars">Set Environment Variables According To URL Parts</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#redirecthome">Redirect Homedirs For Foreigners</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#redirectanchors">Redirecting Anchors</a></li>
@@ -58,52 +57,6 @@ introduction</a></li><li><a href="rewrite_guide_advanced.html">Advanced Rewrite
 useful examples</a></li><li><a href="tech.html">Technical details</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="moveddocroot" id="moveddocroot">Moved <code>DocumentRoot</code></a></h2>
-
-      
-
-      <dl>
-        <dt>Description:</dt>
-
-        <dd>
-<p>Usually the <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>
-of the webserver directly relates to the URL "<code>/</code>".
-But often this data is not really of top-level priority. For example,
-you may wish for visitors, on first entering a site, to go to a
-particular subdirectory <code>/about/</code>. This may be accomplished
-using the following ruleset:</p>
-</dd>
-
-        <dt>Solution:</dt>
-
-        <dd>
-          <p>We redirect the URL <code>/</code> to
-          <code>/about/</code>:
-          </p>
-         
-<div class="example"><pre>
-RewriteEngine on
-RewriteRule   <strong>^/$</strong>  /about/  [<strong>R</strong>]
-</pre></div>
-
-    <p>Note that this can also be handled using the <code class="directive"><a href="../mod/mod_alias.html#redirectmatch">RedirectMatch</a></code> directive:</p>
-
-<div class="example"><p><code>
-RedirectMatch ^/$ http://example.com/about/
-</code></p></div>
-
-<p>Note also that the example rewrites only the root URL. That is, it
-rewrites a request for <code>http://example.com/</code>, but not a
-request for <code>http://example.com/page.html</code>. If you have in 
-fact changed your document root - that is, if <strong>all</strong> of 
-your content is in fact in that subdirectory, it is greatly preferable 
-to simply change your <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>
-directive, rather than rewriting URLs.</p>
-</dd>
-</dl>
-
-    </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
-<div class="section">
 <h2><a name="trailingslash" id="trailingslash">Trailing Slash Problem</a></h2>
 
       
index 3fb19eabec55626af120c0bd050d387b6ed91593..eab1dd105b019568ababf5064635028831c29409 100644 (file)
@@ -53,54 +53,6 @@ introduction</a></seealso>
 useful examples</a></seealso>
 <seealso><a href="tech.html">Technical details</a></seealso>
 
-
-    <section id="moveddocroot">
-
-      <title>Moved <code>DocumentRoot</code></title>
-
-      <dl>
-        <dt>Description:</dt>
-
-        <dd>
-<p>Usually the <directive module="core">DocumentRoot</directive>
-of the webserver directly relates to the URL "<code>/</code>".
-But often this data is not really of top-level priority. For example,
-you may wish for visitors, on first entering a site, to go to a
-particular subdirectory <code>/about/</code>. This may be accomplished
-using the following ruleset:</p>
-</dd>
-
-        <dt>Solution:</dt>
-
-        <dd>
-          <p>We redirect the URL <code>/</code> to
-          <code>/about/</code>:
-          </p>
-         
-<example><pre>
-RewriteEngine on
-RewriteRule   <strong>^/$</strong>  /about/  [<strong>R</strong>]
-</pre></example>
-
-    <p>Note that this can also be handled using the <directive
-    module="mod_alias">RedirectMatch</directive> directive:</p>
-
-<example>
-RedirectMatch ^/$ http://example.com/about/
-</example>
-
-<p>Note also that the example rewrites only the root URL. That is, it
-rewrites a request for <code>http://example.com/</code>, but not a
-request for <code>http://example.com/page.html</code>. If you have in 
-fact changed your document root - that is, if <strong>all</strong> of 
-your content is in fact in that subdirectory, it is greatly preferable 
-to simply change your <directive module="core">DocumentRoot</directive>
-directive, rather than rewriting URLs.</p>
-</dd>
-</dl>
-
-    </section>
-
     <section id="trailingslash">
 
       <title>Trailing Slash Problem</title>