httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject cvs commit: httpd-docs-1.3/htdocs/manual/misc FAQ-E.html
Date Thu, 08 Nov 2001 15:53:12 GMT
slive       01/11/08 07:53:12

  Modified:    htdocs/manual/misc FAQ-E.html
  Log:
  Add a FAQ for "canonical hostnames".  This crossed my "three times in a month"
  threshold on comp.infosystems.www.servers.unix.
  
  Revision  Changes    Path
  1.12      +47 -1     httpd-docs-1.3/htdocs/manual/misc/FAQ-E.html
  
  Index: FAQ-E.html
  ===================================================================
  RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/misc/FAQ-E.html,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -d -b -u -r1.11 -r1.12
  --- FAQ-E.html	2001/10/08 01:26:54	1.11
  +++ FAQ-E.html	2001/11/08 15:53:11	1.12
  @@ -33,7 +33,7 @@
       <h1 align="CENTER">Apache Server Frequently Asked
       Questions</h1>
   
  -    <p>$Revision: 1.11 $ ($Date: 2001/10/08 01:26:54 $)</p>
  +    <p>$Revision: 1.12 $ ($Date: 2001/11/08 15:53:11 $)</p>
   
       <p>The latest version of this FAQ is always available from the
       main Apache web site, at &lt;<a
  @@ -127,6 +127,10 @@
             <li><a href="#ie-ignores-mime">Why do my files appear
             correctly in Internet Explorer, but show up as source or
             trigger a save window with Netscape?</a></li>
  +
  +	  <li><a href="#canonical-hostnames">My site is accessible
  +          under many different hostnames; how do I redirect clients
  +          so that they see only a single name?</a></li>
           </ol>
         </li>
         <!--#endif -->
  @@ -649,6 +653,48 @@
           directive in the Apache configuration files.</p>
           <hr />
         </li>
  +      <li>
  +	<a name="canonical-hostnames"><strong>My site is accessible
  +        under many different hostnames; how do I redirect clients
  +        so that they see only a single name?</strong></a></li>
  +
  +        <p>Many sites map a variety of hostnames to the same content.
  +	(This differs from <a href="../vhosts/">virtual hosting</a> where
  +	different hostnames map to different content.)  For example,
  +        <code>www.example.com</code>, <code>example.com</code>
and
  +        <code>www.example.net</code> may all refer to the same site.
  +	It is best to make sure that, regardless of the name clients
  +	use to access the site, they will be redirected to a single,
  +	canonical hostname.  This makes the site easier to maintain
  +	and assures that there will be only one version of the site
  +	in proxy caches and search engines.</p>
  +
  +        <p>There are two techniques to implement canonical hostnames:</p>
  +
  +        <ol>
  +	  <li>Use <a href="../mod/mod_rewrite.html">mod_rewrite</a>
  +	  as described in the "Canonical Hostnames" section of the
  +	  <a href="rewriteguide.html">URL Rewriting Guide</a>.</li>
  +
  +	  <li>Use <a href="../vhosts/name-based.html">name-based
  +	  virtual hosting</a>:
  +
  +<blockquote><code>
  +NameVirtualHost *<br>
  +<br>
  +&lt;VirtualHost *&gt;<br>
  +&nbsp;&nbsp;ServerName www.example.net<br>
  +&nbsp;&nbsp;ServerAlias example.com<br>
  +&nbsp;&nbsp;Redirect permanent / http://www.example.com/<br>
  +&lt;/VirtualHost&gt;<br>
  +<br>
  +&lt;VirtualHost *&gt;<br>
  +&nbsp;&nbsp;ServerName www.example.com<br>
  +&nbsp;&nbsp;DocumentRoot /usr/local/apache/htdocs<br>
  +&lt;/VirtualHost&gt;
  +</code></blockquote>
  +       </ol>
  +        <hr /></li>
       </ol>
       <!--#endif -->
       <!--#if expr="$STANDALONE" -->
  
  
  

Mime
View raw message