Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 84090 invoked by uid 500); 6 Dec 2001 22:34:37 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 84066 invoked from network); 6 Dec 2001 22:34:36 -0000 Received: from smtpzilla2.xs4all.nl (194.109.127.138) by daedalus.apache.org with SMTP; 6 Dec 2001 22:34:36 -0000 Received: from onnodesktop (onno.xs4all.nl [194.109.237.83]) by smtpzilla2.xs4all.nl (8.12.0/8.12.0) with SMTP id fB6MYfBi066875 for ; Thu, 6 Dec 2001 23:34:41 +0100 (CET) Message-ID: <00a201c17ea6$3bbd09c0$1400a8c0@onnodesktop> From: "Onno Bosch" To: References: <3C0FEA39.7856479B@ccidomain.com> Subject: Re: mod_rewrite better for this? Date: Thu, 6 Dec 2001 23:34:56 +0100 Organization: Skipass.com MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, I'm being a newbee to Apache, but to me the solution seems very simple. Just define the virtualhost container as follows: ServerAdmin webmaster@domain.com DocumentRoot /net/www/public_html/www ServerName www.domain.com ServerAlias domain.com ScriptAlias /cgi-bin/ /net/www/public_html/cgi-bin/ ErrorLog /net/www/public_html/logs/http.err CustomLog /net/www/public_html/logs/access.log combined Please notice the ServerAlias directive. This makes your second container (the one redirecting the URL without www. to the www.domain.com server) needless. The same idea works fine for me on a server I'm currently working on... Onno > I have two virtual host domains. One redirects to the other, and both > are available with and without the www. in front of the domain name. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org