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 45BEA1773B for ; Thu, 29 Jan 2015 10:54:33 +0000 (UTC) Received: (qmail 37720 invoked by uid 500); 29 Jan 2015 10:54:30 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 37662 invoked by uid 500); 29 Jan 2015 10:54:30 -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 37487 invoked by uid 99); 29 Jan 2015 10:54:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jan 2015 10:54:30 +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 dferradal@gmail.com designates 209.85.217.176 as permitted sender) Received: from [209.85.217.176] (HELO mail-lb0-f176.google.com) (209.85.217.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jan 2015 10:54:26 +0000 Received: by mail-lb0-f176.google.com with SMTP id z12so26611102lbi.7 for ; Thu, 29 Jan 2015 02:53:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:from:date:message-id:subject:to :content-type; bh=Yk1fKQNLPi74ZlD2/mXDLbQj6gYWQOkHQmtIa7YjUY4=; b=1FsE/msTQxxhfn8o9jjk9sH9kHvc3Fkb0DqYD3XZboNCFRYW9wp6PByJjTz3Vi+j78 gfl4vbiCN4rm1cgaAajZGiAQDOr+52ch0NV/GARrbKbbA9q+lB/G9Ei9PQhwKtuL8yOo cU0UPkWmCvohv1OtVEYIbhh2LspwSl3b1yWdUPiA3gvOKPoT/PYjyl5XFKl4ZlXfWm15 5Cw3fCUq5v9Yat1k6FwFiHVGT81PZ9aX3tBDFzqgL04nA47ybuvRtLQTkr7ut6jki1p2 99tpp+MQELkIoT445wYxz8CYDjWPBwBw5m+NfBYpP1EsFI0iC5zWrYztAmPTZBSw9kMD 8P/w== X-Received: by 10.152.87.106 with SMTP id w10mr13591714laz.41.1422528799735; Thu, 29 Jan 2015 02:53:19 -0800 (PST) MIME-Version: 1.0 References: <4343868F-9508-4453-AFB4-E7CF362C7594@electrichendrix.com> From: Daniel Date: Thu, 29 Jan 2015 10:53:19 +0000 Message-ID: To: "" Content-Type: multipart/alternative; boundary=001a11c354faca8766050dc84bcb X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Redirect http to https --001a11c354faca8766050dc84bcb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Don't use pcre in redirect. For what you ask you just need a simple: Redirect / https://yourdomain/ in the nonssl virtual host. If you insist on using pcre with redirect for some particular reason you have not mentioned yet, use RedirectMatch. Regards El jue., 29 de enero de 2015 1:06, Chris Arnold escribi=C3=B3: > > On Jan 28, 2015, at 6:31 PM, Yehuda Katz wrote: > > Make sure you put these in the correct VHOST. They need to be in the > :80 vhost, not the :443 vhost. > > I usually use the Redirect directive ( > http://httpd.apache.org/docs/2.4/mod/mod_alias.html#redirect) instead. > > > Yea, I tried that, like this in the :80 vhost: > > Redirect permanent ^/share(.*) https://share.domain.tld/share [R=3D301,L= ] > > Then in a browser type share.domain.tld and you land on http://domain.tl= d > site though the URL in the browser has https://share.domain.tld > --001a11c354faca8766050dc84bcb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Don't use pcre in redirect.

For what you ask you just need a simple:
Redirect / https://yourdomain/ in the n= onssl virtual host.

If you insist on using pcre with redirect for some particula= r reason you have not mentioned yet, use RedirectMatch.

Regards


El jue., 29 de enero de 2015 1:06, Chris Arn= old <carnold@electrichend= rix.com> escribi=C3=B3:

On Jan 28, 2015, at 6:31 PM, Yehuda Katz <yehuda@ymkatz.net> wrote:

Make sure you put these in the correct VHOST. They need to= be in the :80 vhost, not the :443 vhost.

I usually use the Redirect directive (http://httpd.apa= che.org/docs/2.4/mod/mod_alias.html#redirect) instead.

Yea, I tried that, like this in the :80 vhost:=

Redirect permanent ^/share(.*) https://share.domain.tld/share [R=3D301,L]

Then in a browser type share.domain.tld and you land on http://domain.tld site though the URL in the browser has https://share.domain.tld
--001a11c354faca8766050dc84bcb--