Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2986E1735E for ; Mon, 23 Feb 2015 03:00:50 +0000 (UTC) Received: (qmail 84591 invoked by uid 500); 23 Feb 2015 03:00:47 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 84551 invoked by uid 500); 23 Feb 2015 03:00:47 -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 84541 invoked by uid 99); 23 Feb 2015 03:00:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Feb 2015 03:00:46 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of icicimov@gmail.com designates 209.85.212.176 as permitted sender) Received: from [209.85.212.176] (HELO mail-wi0-f176.google.com) (209.85.212.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Feb 2015 03:00:42 +0000 Received: by mail-wi0-f176.google.com with SMTP id h11so13811836wiw.3 for ; Sun, 22 Feb 2015 19:00:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=gPE/o4J3FsIMAgTTe6qhPZGs9br99DVpu7THcYZNnKI=; b=IFK8JchuPGpbtdnat1s0hg5Oamcy9updx1h3AxDd7ZjpjR6UqKpT04nTnTrgZisUya Zw7ur+Kp36Y+Yvk2JgQDitNKlvJe39G8v1Cu8W2p5e/h4PENAbgUbrblxOWsrWhPXR73 DLgv5gGZDmw88mh/4AzyLa0QPA/4A4manheyQk3lTJuRphqOayyWOM8sqj0YtwaW+nFY Bx15hU47XO0by+PwOCjfqMzFRKklcMzhY8iVonnaiWRKpk0tMMUyzFhsDhurYz0hCj7R DkmYkzP5BEBTXCalfcoSxziZsieW6EcojaMPxm4Kyz0WdkNUNJYEpQzJ+s+0cinJ4YNz 6Ywg== MIME-Version: 1.0 X-Received: by 10.194.175.39 with SMTP id bx7mr18387711wjc.22.1424660421809; Sun, 22 Feb 2015 19:00:21 -0800 (PST) Received: by 10.28.49.68 with HTTP; Sun, 22 Feb 2015 19:00:21 -0800 (PST) Received: by 10.28.49.68 with HTTP; Sun, 22 Feb 2015 19:00:21 -0800 (PST) In-Reply-To: <3bfd363c621b4218999ae672c35038ac@mailsrv.electrichendrix.com> References: <3bfd363c621b4218999ae672c35038ac@mailsrv.electrichendrix.com> Date: Mon, 23 Feb 2015 14:00:21 +1100 Message-ID: From: Igor Cicimov To: users Content-Type: multipart/alternative; boundary=089e01493ada5e1da7050fb89a54 X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Reverse Proxy/HTTPS Issues --089e01493ada5e1da7050fb89a54 Content-Type: text/plain; charset=UTF-8 On 23/02/2015 1:54 PM, "Chris Arnold" wrote: > > Apache 2.4.10. We have many users who still access a site using http://sub.domain.com/webapp/page. We first want to redirect that above link to https. We would also like to redirect http://sub.domain.com to https://sub.domain.com/webapp. We have this working in the virtual host:80 with this: > > > ProxyPass /webapp/ https://sub.domain.com/webapp/ > ProxyPassReverse /webapp/ https://sub.domain.com/webapp/ > RedirectMatch ^/$ https://sub.domain.com/webapp/ > > > What does not work is this: > > > ProxyPass /webapp/page/ https://sub.domain.com/webapp/ > ProxyPassReverse /webapp/page/ https://sub.domain.com/webapp/ > RedirectMatch ^/$ https://sub.domain.com/webapp/page/ > > > When you type sub.domain.com/webapp/page in a browser, it does not redirect to https. Can anybody see why it is not redirecting to https? Think about what are you doing with: RedirectMatch ^/$ and you will find your answer. --089e01493ada5e1da7050fb89a54 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 23/02/2015 1:54 PM, "Chris Arnold" <carnold@electrichendrix.com> wrote:
>
> Apache 2.4.10. We have many users who still access a site using http://sub.domain.com/webapp/page. We first want to redirect that above link to https. We would also like = to redirect http://sub.domain.com to = https://sub.domain.com/webapp= . We have this working in the virtual host:80 with this:
>
>
> ProxyPass /webapp/ https://= sub.domain.com/webapp/
> ProxyPassReverse /webapp/ h= ttps://sub.domain.com/webapp/
> =C2=A0RedirectMatch ^/$ htt= ps://sub.domain.com/webapp/
>
>
> What does not work is this:
>
>
> ProxyPass /webapp/page/ htt= ps://sub.domain.com/webapp/
> ProxyPassReverse /webapp/page/ https://sub.domain.com/webapp/
> =C2=A0RedirectMatch ^/$ https://sub.domain.com/webapp/page/
>
>
> When you type sub.domain= .com/webapp/page in a browser, it does not redirect to https. Can anybo= dy see why it is not redirecting to https?

Think about what are you doing with:

RedirectMatch ^/$

and you will find your answer.

--089e01493ada5e1da7050fb89a54--