From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-127260-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1Qvc7L-000777-Th
	for garchives@archives.gentoo.org; Mon, 22 Aug 2011 21:33:12 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id DF85D21C39D;
	Mon, 22 Aug 2011 21:32:56 +0000 (UTC)
Received: from mail-vx0-f181.google.com (mail-vx0-f181.google.com [209.85.220.181])
	by pigeon.gentoo.org (Postfix) with ESMTP id BB49521C304
	for <gentoo-user@lists.gentoo.org>; Mon, 22 Aug 2011 21:32:05 +0000 (UTC)
Received: by vxi39 with SMTP id 39so5691784vxi.40
        for <gentoo-user@lists.gentoo.org>; Mon, 22 Aug 2011 14:32:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=mime-version:sender:in-reply-to:references:from:date
         :x-google-sender-auth:message-id:subject:to:content-type
         :content-transfer-encoding;
        bh=7BhOym5hbg49Mx9N/U+vRxxNRbDPngsLbXzUwCDDx1o=;
        b=UUp7N1YgXw/a5yFiYVB8QiEaHfqlbbYDVGK5C9E+kYmK4MDzYZCIjva8JzB/N+plEe
         Gg6J27B7LE03XWQ18i8nfBjKji/9od5OcuSD8xU5qMA9mEAo1cGtNOO9jQZhqQnopIcw
         sNs9YEh8UVcR/l941mF1BqfT1iutQvsCTI7zc=
Received: by 10.52.92.52 with SMTP id cj20mr2900899vdb.410.1314048725252; Mon,
 22 Aug 2011 14:32:05 -0700 (PDT)
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Sender: paul.hartman@gmail.com
Received: by 10.52.160.1 with HTTP; Mon, 22 Aug 2011 14:31:45 -0700 (PDT)
In-Reply-To: <CAE1pOi3oHj5yO88=KtA1KUstne9w8GxDfEgTKz55Aks1BtZr4w@mail.gmail.com>
References: <CAE1pOi3oHj5yO88=KtA1KUstne9w8GxDfEgTKz55Aks1BtZr4w@mail.gmail.com>
From: Paul Hartman <paul.hartman+gentoo@gmail.com>
Date: Mon, 22 Aug 2011 16:31:45 -0500
X-Google-Sender-Auth: YlR8hBgKPz_vuQxuUQSaj_qizls
Message-ID: <CAEH5T2O9HPHx5bHBNbLJwmdvOxsbJH-QCTMMfbLO3EVv99bppw@mail.gmail.com>
Subject: Re: [gentoo-user] [Apache HTTPD] Why doesn't my RewriteRule fire?
To: gentoo-user@lists.gentoo.org
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 
X-Archives-Hash: f68462a480fe44f3924f34bd17bc749d

On Mon, Aug 22, 2011 at 4:07 PM, Hilco Wijbenga
<hilco.wijbenga@gmail.com> wrote:
> =A0RewriteRule ^/website$ =A0 =A0http://localhost/website/ [T]
> =A0ProxyPassMatch =A0 =A0^/website/(.*)$
> http://localhost:8000/website/$1
> </VirtualHost>
>
> The ProxyPassMatch fires but (AFAICT) the RewriteRule does not. I.e.
> http://localhost/website (no slash) =3D=3D> 404 (in fact, it's trying to
> serve /var/www/localhost/htdocs/website) but http://localhost/website
> (with slash) =3D=3D> works.

Disclaimer: I am not an Apache guru :)

You have [T] as third parameter to RewriteRule, which is used to
specify a MIME type,  but you're not specifying anything. Maybe that
invalidates the rule. Try removing it.

You can also specify multiple RewriteRules which are processed in
sequence, if trailing slash works maybe you need to first add a rule
convert URL with no slash to URL with slash:

RewriteRule ^/website$ /website/ [R]