diff options
author | Rich Bowen <rbowen@apache.org> | 2009-11-17 02:56:34 +0100 |
---|---|---|
committer | Rich Bowen <rbowen@apache.org> | 2009-11-17 02:56:34 +0100 |
commit | 03af895d972fce0a286e110c687a0e0e0c1d00a3 (patch) | |
tree | 2656650947372e08f67e72d107078db4b17f8eb5 /docs/manual/rewrite | |
parent | tweak r823613/PR 47951 change to avoid /usr/sbin/install on (diff) | |
download | apache2-03af895d972fce0a286e110c687a0e0e0c1d00a3.tar.xz apache2-03af895d972fce0a286e110c687a0e0e0c1d00a3.zip |
Moving yet another recipe. Almost done with this exercise.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@881091 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/rewrite')
-rw-r--r-- | docs/manual/rewrite/remapping.html.en | 48 | ||||
-rw-r--r-- | docs/manual/rewrite/remapping.xml | 44 | ||||
-rw-r--r-- | docs/manual/rewrite/rewrite_guide.html.en | 49 | ||||
-rw-r--r-- | docs/manual/rewrite/rewrite_guide.xml | 48 |
4 files changed, 93 insertions, 96 deletions
diff --git a/docs/manual/rewrite/remapping.html.en b/docs/manual/rewrite/remapping.html.en index a788f5e489..452c9ae8dc 100644 --- a/docs/manual/rewrite/remapping.html.en +++ b/docs/manual/rewrite/remapping.html.en @@ -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"> en </a></p> diff --git a/docs/manual/rewrite/remapping.xml b/docs/manual/rewrite/remapping.xml index fd1374eb32..a1e48e74cc 100644 --- a/docs/manual/rewrite/remapping.xml +++ b/docs/manual/rewrite/remapping.xml @@ -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> diff --git a/docs/manual/rewrite/rewrite_guide.html.en b/docs/manual/rewrite/rewrite_guide.html.en index 73095f0a42..353e2801b5 100644 --- a/docs/manual/rewrite/rewrite_guide.html.en +++ b/docs/manual/rewrite/rewrite_guide.html.en @@ -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> diff --git a/docs/manual/rewrite/rewrite_guide.xml b/docs/manual/rewrite/rewrite_guide.xml index 3fb19eabec..eab1dd105b 100644 --- a/docs/manual/rewrite/rewrite_guide.xml +++ b/docs/manual/rewrite/rewrite_guide.xml @@ -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> |