Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 85902 invoked from network); 14 Dec 2006 15:08:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Dec 2006 15:08:01 -0000 Received: (qmail 74863 invoked by uid 500); 14 Dec 2006 15:07:57 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 74845 invoked by uid 500); 14 Dec 2006 15:07:57 -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 74834 invoked by uid 99); 14 Dec 2006 15:07:57 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Dec 2006 07:07:57 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of jslive@gmail.com designates 209.85.132.248 as permitted sender) Received: from [209.85.132.248] (HELO an-out-0708.google.com) (209.85.132.248) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Dec 2006 07:07:47 -0800 Received: by an-out-0708.google.com with SMTP id c8so186502ana for ; Thu, 14 Dec 2006 07:07:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=je+RNLULB+WX5/Fqft+zuVqjmJHmiXgsbCpHMqdAZkqPz03yY6XWuwjmN7khvM3UsfmIlPvQ9ZZG2S8v6zFPOAQrJqVV1m0R+4zBiaFjfGm4BQyIl03+9Nb5y4CAWjdpbNcC8GO/XiYx6ou5PdvR2cTZ/BU6d5A4ffydLtyt33M= Received: by 10.100.164.14 with SMTP id m14mr804476ane.1166108846511; Thu, 14 Dec 2006 07:07:26 -0800 (PST) Received: by 10.70.45.4 with HTTP; Thu, 14 Dec 2006 07:07:26 -0800 (PST) Message-ID: Date: Thu, 14 Dec 2006 10:07:26 -0500 From: "Joshua Slive" Sender: jslive@gmail.com To: users@httpd.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: 765fad62d62d33bb X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] re-writing URI's On 12/14/06, Foster, Stephen (ASPIRE) wrote: > Hi there, > > i'm having a bit of trouble getting a rewrite rule for a URI to work. > Basically i have the following scenario, > > The user enters http://www.domain.com and this gets intercepted by another API and the browser gets a URL sent back with a URI added including the original URL of http://www.domain.com , my re-writing rules then re-write the first part to secure, i.e https://www.domain.com but the URI stays non-secure ,e.g http://www.domain.com > > so the outcome to the browser is: > > https://www.domain.com/login?APPURI=http://www.domain.com/home > > What i need to do when i re-write the first part to secure is also to intercept the URI and re-write this to secure if it comes back as non-secure, so i need the URL being sent back to the browser to appear as follows: > https://www.domain.com/login?APPURI=https://www.domain.com/home > > I know i can use the RewriteCond %{REQUEST_URI} context but need to be able to tell it to find "http:" and re-write this to "https:" wherever it appears in the URI in case the developers change it without me knowing. However if needs be then i can intercept "APPURI=http:" and rewrite this to "APPURI=https:" > > Does that make sense to anybody?? Sure, it should be a relatively straightforward regex with substitution. But I'm not going to try to guess at your entire config. Show us what you've got already and we can perhaps tell you what to add. Joshua. --------------------------------------------------------------------- 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