Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 92649 invoked from network); 1 Dec 2005 18:56:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Dec 2005 18:56:43 -0000 Received: (qmail 1485 invoked by uid 500); 1 Dec 2005 18:56:30 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 1476 invoked by uid 500); 1 Dec 2005 18:56:29 -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 1465 invoked by uid 99); 1 Dec 2005 18:56:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2005 10:56:29 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jslive@gmail.com designates 64.233.184.202 as permitted sender) Received: from [64.233.184.202] (HELO wproxy.gmail.com) (64.233.184.202) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2005 10:57:57 -0800 Received: by wproxy.gmail.com with SMTP id 69so317586wra for ; Thu, 01 Dec 2005 10:56:06 -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=o+UEVf0piXEjOm24Ka4ubFl05D1KHSqYK9nECpb16rWvdivrW6bhYi/YP8+bYDkp++TGYuV5fXWWv61IATbCMLJ4YBQozYxpozrwy9X0qrrBTGhkNq62rjQ7EjBjg8PZvBucgejeKL8ODwPI2IGFjH9Kg3TLUXO0K3iNx1WwVME= Received: by 10.64.195.11 with SMTP id s11mr1007453qbf; Thu, 01 Dec 2005 10:56:06 -0800 (PST) Received: by 10.65.11.16 with HTTP; Thu, 1 Dec 2005 10:56:06 -0800 (PST) Message-ID: Date: Thu, 1 Dec 2005 13:56:06 -0500 From: Joshua Slive To: users@httpd.apache.org In-Reply-To: <438F431D.5060309@conwaycorp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <438E294F.20309@conwaycorp.net> <438F431D.5060309@conwaycorp.net> X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] redirecting everything to ssl X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 12/1/05, Rob Benton wrote: > > RewriteCond %{HTTP_HOST} !^my\.site [NC] > RewriteCond %{HTTP_HOST} !^$ > RewriteCond %{SERVER_PORT} ^(80|443)$ > RewriteRule ^/(.*) https://my.site/$1 [L,R] > > That will direct all https:// traffic to the right hostname but trying > to use http:// still results in the bad request error: > > "Your browser sent a request that this server could not understand. > Reason: You're speaking plain HTTP to an SSL-enabled server port. > Instead use the HTTPS scheme to access this URL, please." > > I must have missed something else in the config file. I have 2 Listen > directives, 1 for 80, and 1 for 443. You probably have SSL turned on for the entire server, rather than just for the requests coming in on port 443. As I mentioned in an earlier reply, you should have two vhosts: one for ssl on 443 and one for non-ssl on 80. The second one just redirects to the first and the SSLEngine directive is only in the first one. Joshual. --------------------------------------------------------------------- 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