Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 78434 invoked by uid 500); 3 Jun 2002 16:54:41 -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 78423 invoked from network); 3 Jun 2002 16:54:41 -0000 Received: from qm1.hostfarm.net (207.190.209.37) by daedalus.apache.org with SMTP; 3 Jun 2002 16:54:41 -0000 Received: (qmail 11318 invoked by uid 89); 3 Jun 2002 16:56:06 -0000 Received: from unknown (HELO nate) (207.190.209.7) by 0 with SMTP; 3 Jun 2002 16:56:06 -0000 Message-ID: <05ce01c20b1f$52dafc10$7d01440a@nate> From: "Nate" To: "Apache List" Subject: Rewriting a URL Date: Mon, 3 Jun 2002 12:54:27 -0400 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 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I currently run Redhat 7.2 with Apache 1.3.22. Mod_Rewrite is installed. Scenario: I want to be able to take a name-based virtual host and point multiple domains to it, but have all domains be rewritten as the primary domain. (ie. say I have www.domain.com, www.domain.org, www.domain.net, if I type those into my browser, I want all of them to be rewritten as www.domain.com). I tried the following: ServerName www.domain.com DocumentRoot /wwwroot/domain1 ServerAlias www.domain.org RewriteEngine on RewriteCond %{HTTP_HOST} !^www.domain.org(:80)?$ RewriteRule ^/(.*) http://www.domain.com/$1 [L,R] RewriteOptions inherit The problem is that I don't completely understand the expressions, and the info I have found on various sites just don't seem to explain it so it clicks. Is there a simpler way to say something like "take all domains/hosts that are aliased to this virtual host and re-write them as www.domain.com" ? Could anyone point me in the right direction? Should I even be using mod_rewrite? Ack! =) Nate D. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org