From dev-return-38779-apmail-httpd-dev-archive=httpd.apache.org@httpd.apache.org Fri Aug 01 11:31:28 2003 Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 35907 invoked by uid 500); 1 Aug 2003 11:31:25 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 35765 invoked from network); 1 Aug 2003 11:31:23 -0000 From: =?ISO-8859-1?Q?Andr=E9?= Malo Subject: Re: Mod-rewrite / mod-env weirdness Date: Fri, 01 Aug 2003 13:35:16 +0200 References: <4.3.2.7.2.20030731175113.0253d708@skea.com> <4.3.2.7.2.20030801091711.00b67240@skea.com> Lines: 24 Organization: TIMTOWTDI MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit To: dev@httpd.apache.org Message-ID: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N * Alan Skea wrote: > However ... now I'm using the HTTPS variable and getting exactly the same > behaviour. The problem is only in the top-level request - in > subrequests, as you say, the variables have been initialised.Also > it's only the first time that the virtual server is used in a given httpd > process. Subsequent requests to the same URL in the same httpd > process are OK and the top-level request has the variable set. It > looks to me like there is some curiosity in the way that a virtual server > gets initialised. Uuh, I have taken a look into mod_ssl now. HTTPS will be set very late as well :-(. I'm not a mod_ssl guru, so I don't know whether it could be set earlier... Fortunately you can use the mod_rewrite lookahead feature in order to solve this. The following should work reliably: RewriteCond %{LA-U:ENV:HTTPS} !=on ... nd P.S.: please avoid HTML(-only) postings.