Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 46196 invoked from network); 1 Dec 2006 10:24:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Dec 2006 10:24:19 -0000 Received: (qmail 40672 invoked by uid 500); 1 Dec 2006 10:24:15 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 40652 invoked by uid 500); 1 Dec 2006 10:24:15 -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 40640 invoked by uid 99); 1 Dec 2006 10:24:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Dec 2006 02:24:15 -0800 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=INFO_TLD,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of krist.vanbesien@gmail.com designates 66.249.92.169 as permitted sender) Received: from [66.249.92.169] (HELO ug-out-1314.google.com) (66.249.92.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Dec 2006 02:24:03 -0800 Received: by ug-out-1314.google.com with SMTP id 75so2224878ugb for ; Fri, 01 Dec 2006 02:23:41 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eYpYLZqQF1eAuCrVTbrCtH7QCVhGKaR6SaVgKXmbb93B0CvSePY6E3XWzZgqx3jc2EdGaOQbuLZ7jbpR+53GHy+EEab0+GAsXlOuAzAt1roCLnJ/f+wxGm4CgFQ3CeSV9SE7VBjJIPuStd3DB5GG9dg6iPtC9BhL7+RND0eirNE= Received: by 10.78.39.16 with SMTP id m16mr4650357hum.1164968621571; Fri, 01 Dec 2006 02:23:41 -0800 (PST) Received: by 10.78.155.14 with HTTP; Fri, 1 Dec 2006 02:23:40 -0800 (PST) Message-ID: <6ed6382b0612010223w3f6143c3vc1295093dc6cb9b@mail.gmail.com> Date: Fri, 1 Dec 2006 11:23:40 +0100 From: "Krist van Besien" To: users@httpd.apache.org In-Reply-To: <456EAB24.8060908@khine.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <456EAB24.8060908@khine.net> X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] How to chain two rules On 11/30/06, Norman Khine wrote: > Hello, > Can someone please advise how to chain two rules together so that: > > [1] > [2] ServerName mysite.com > [3] ServerAlias www.mysite.com > [4] RewriteEngine On > [5] RewriteCond %{HTTP_HOST} ^www\.mysite\.info [nc] > [6] RewriteRule (.*) http://mysite.info/$1 [R=301,C] > [7] RewriteRule ^/(.*) > [8] http://mysite.com:5080/VirtualHostBase/http/mysite.com:80/sites/site/VirtualHostRoot/$1 > [L,P] > [9] ErrorLog /var/log/apache2/site_error.log > [10] CustomLog /var/log/apache2/site_access.log combined > [11] RewriteLog /var/log/apache2/site_rewrite_log > [12] > > > When I have this rule, and type http://www.mysite.com my requests don't > go to the next rule. I have specified the 'C' flag which is the chain to > next rule, all I get is: > > > Not Found > > The requested URL // was not found on this server. Your problem might be that the requests don't get handled by the virtual host block you quoted above. The virtual server will only process requests were the "HOST" header is mysite.com of www.mysite.conf (because of lines 2 and 3), unless it is also the default virtual host for this server, but this I can't judge. I would do the following: - Run httpd -S and look at the output, to see if this virtual host is considered the default. If it is not, add "ServerAlias www.mysite.info" to your virtual host def. Mybe you need to adde "ServerAlias mysite.info" too. - Add the directive "RewriteLogLevel 3" to your config, so your rewrite log will contain something. Krist -- krist.vanbesien@gmail.com Bremgarten b. Bern, Switzerland --------------------------------------------------------------------- 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