Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 92069 invoked from network); 15 Jun 2010 13:09:36 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jun 2010 13:09:36 -0000 Received: (qmail 30132 invoked by uid 500); 15 Jun 2010 13:09:33 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 29872 invoked by uid 500); 15 Jun 2010 13:09:31 -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 29864 invoked by uid 99); 15 Jun 2010 13:09:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jun 2010 13:09:30 +0000 X-ASF-Spam-Status: No, hits=3.1 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_OBFU_WWW X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tevans.uk@googlemail.com designates 209.85.161.45 as permitted sender) Received: from [209.85.161.45] (HELO mail-fx0-f45.google.com) (209.85.161.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jun 2010 13:09:24 +0000 Received: by fxm17 with SMTP id 17so3137794fxm.18 for ; Tue, 15 Jun 2010 06:09:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=YN0aQJMvrcHxxJlMYUTfbSlyuSAPFbQ8fIAf5+NE9qo=; b=OljfbIADRX31+unyKxyRO6XZok48Fx1n+ceJPSlbbnhTewetw2mTb8KXUozmPB/aav Oa4KIXVSvHxk4LchahDTaWwo6hASLW3MF5zxRlSUFoYaMOPE/rFBEDuCMmiLhfR0XTvI HmvgOHf9YYTKbHrtZ0waxdEYMP6M9JMH9CKk4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=DZepvmJ9YrELdXEFk067i807lhYE24rXSYgXc3YVWVIlZzqfCI9NXyZOXeAfUy0iae 2mVhSMUHJlGmgE2b1ng7YhdhXQKDzMIhd/CriKFu2y7rTwYTfeoV4nM8hAU94NplVNSV 7dA4F51G0jH/gCOuvNc5BktoyMHEyjfn5mljw= MIME-Version: 1.0 Received: by 10.239.187.141 with SMTP id l13mr526952hbh.60.1276607342647; Tue, 15 Jun 2010 06:09:02 -0700 (PDT) Received: by 10.239.185.1 with HTTP; Tue, 15 Jun 2010 06:09:02 -0700 (PDT) In-Reply-To: References: Date: Tue, 15 Jun 2010 14:09:02 +0100 Message-ID: From: Tom Evans To: users@httpd.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] rewrite rule tutorial on ask apache I could not understand syntax On Tue, Jun 15, 2010 at 1:42 PM, Tapas Mishra wrot= e: > http://http://www.askapache.com/htaccess/crazy-advanced-mod_rewrite-tutor= ial.html > > =C2=A0is a link to a tutorial which mentions following use of ReWriteRule= is wrong. > > RewriteEngine On > RewriteBase / > > RewriteCond %{HTTP_HOST} !^www\.askapache\.com$ [NC] > RewriteRule .+ http://www.askapache.com%{REQUEST_URI} > > I could not understand what is the mistake in the above rule? > Can some one point what is the error which the tutorial is trying to tell= . > I don't know what he's smoking, I use a rule almost identical to that in many places. Perhaps it behaves differently in .htaccess configuration, which is what he is describing. The rule I use on a daily basis: RewriteCond %{HTTP_HOST} !^(altname\.example\.com|name\.example\.com)$ RewriteRule ^/(.*) http://name.example.com/$1 [R=3D301,L] Also, his point about not being able to see what the various variables are, I kind of see his point, it would be nice to have examples of what the variables could be, but you can always turn on the rewrite log to see stuff like that. Cheers Tom --------------------------------------------------------------------- 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