Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D7B8C67A2 for ; Thu, 2 Jun 2011 00:41:17 +0000 (UTC) Received: (qmail 71052 invoked by uid 500); 2 Jun 2011 00:41:14 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 70960 invoked by uid 500); 2 Jun 2011 00:41:14 -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: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 70952 invoked by uid 99); 2 Jun 2011 00:41:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jun 2011 00:41:14 +0000 X-ASF-Spam-Status: No, hits=3.1 required=5.0 tests=SPF_PASS,URI_OBFU_WWW X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gmillikan@t1shopper.com designates 208.64.252.230 as permitted sender) Received: from [208.64.252.230] (HELO www.t1shopper.com) (208.64.252.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jun 2011 00:41:09 +0000 Received: from rabbithill (static-71-177-216-6.lsanca.fios.verizon.net [71.177.216.6]) (authenticated bits=0) by www.t1shopper.com (8.13.8/8.13.8) with ESMTP id p520emL9021594 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Thu, 2 Jun 2011 00:40:49 GMT From: "Geoff Millikan" To: References: <5D491B03CB024D5D90ACE8FD8DB334FA@rabbithill> In-Reply-To: Date: Wed, 1 Jun 2011 17:40:50 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcwguiCbMYOKAUzfTE6FWPMSgXaWCwAAfv7g X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7601.17574 Subject: RE: [users@httpd] Special configuration for requests that do not match any particular virtual host? Apache 2.2 > Actually on second thought, the rewrite rule in the first host=20 > should be like this to avoid loop: >=A0 =A0 =A0=A0=20 >=A0=A0=A0=A0=A0 RewriteEngine On >=A0=A0=A0=A0=A0 RewriteCond %{HTTP_HOST} !^www\.mydomain\.com [OR] >=A0=A0=A0=A0=A0 RewriteCond %{HTTP_HOST} !^mydomain\.com > =A0 =A0 =A0RewriteRule =A0 =A0 .* = http://www.mydomain.com%{REQUEST_URI} [L,R=3D301] Per manual excerpted below, the first section should only = be used when the hostname being requested isn't listed anywhere else in a ServerName or ServerAlias, right?! So these = RewriteCond shouldn't be needed! Right? I'd use exclusion RewriteCond but since we have other domain names on = the server like www.MyPersonalWebsite.com and www.OurOldCompanyName.com etc we'd have to write rule for each domain. = Messy.=20 Thanks, Geoff "Now when a request arrives, the server will first check if it is using = an IP address that matches the NameVirtualHost. If it is, then it will look at each section with a matching IP = address and try to find one where the ServerName or ServerAlias matches the requested hostname. If it finds one, then it uses the = configuration for that server. If no matching virtual host is found, then the first listed virtual host that matches the IP address = will be used."=20 http://httpd.apache.org/docs/current/vhosts/name-based.html --------------------------------------------------------------------- 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 " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org