Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 48EC110ECE for ; Wed, 22 Jan 2014 15:55:09 +0000 (UTC) Received: (qmail 27598 invoked by uid 500); 22 Jan 2014 15:55:06 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 27492 invoked by uid 500); 22 Jan 2014 15:55:06 -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: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 27477 invoked by uid 99); 22 Jan 2014 15:55:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jan 2014 15:55:05 +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 (nike.apache.org: domain of thomas.r.w.eckert@gmail.com designates 209.85.216.44 as permitted sender) Received: from [209.85.216.44] (HELO mail-qa0-f44.google.com) (209.85.216.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jan 2014 15:54:58 +0000 Received: by mail-qa0-f44.google.com with SMTP id w5so644922qac.31 for ; Wed, 22 Jan 2014 07:54:38 -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=Vq0OmzJco5FCyJy6AVdaNurGt5CXVJl+r+rRSNVTaJg=; b=Ql5sk5SXc7u14DgEH9yL1mWbgLUi6WMi7VFwlMW5I39LBMMoeqI8nQmnRSju5yTYyd BJxKKnUVlh87LGeoMvzCJFVei8UiQy7ybyrN6Xxy/mD/Rc41zEIJB3XIWlGWaZvbY0Af QZqwVTJaBz6hKEIvfR4iZgpWhTj6tt6t6MSYblK3Spf0Wa/TcAVEiI+OM5mD3To/CGcx IAKNcdH+ww7XKA+hLt9ePnoN0EE3xbiCEPM6HCuYNjljFEDymOm76xg7YwCumQLoBbLP 3caxX57fGk/nkrrjWoVh1MCX9ddbI/dqtVe8hAirT5dj+40RAhiTrzaf92MgcPEdOM3r pYeA== MIME-Version: 1.0 X-Received: by 10.140.81.112 with SMTP id e103mr3296994qgd.85.1390406078099; Wed, 22 Jan 2014 07:54:38 -0800 (PST) Received: by 10.96.133.166 with HTTP; Wed, 22 Jan 2014 07:54:37 -0800 (PST) In-Reply-To: References: Date: Wed, 22 Jan 2014 16:54:37 +0100 Message-ID: Subject: Re: mod_alias' Redirect with dynamic host From: Thomas Eckert To: dev@httpd.apache.org Content-Type: multipart/alternative; boundary=001a11c12c3c60f4d004f0912461 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c12c3c60f4d004f0912461 Content-Type: text/plain; charset=ISO-8859-1 I remember a discussion about general support for this kind of expression parsing after I asked for it via IRC/list but cannot remember what became of it. It would definitely be neat to have that kind of thing in there - much less copy-n-paste like config sections ! Glad to hear there's progress on this front. Thanks ! On Wed, Jan 22, 2014 at 4:42 PM, Graham Leggett wrote: > On 22 Jan 2014, at 5:36 PM, Thomas Eckert > wrote: > > Some time ago I put up HTTP to HTTPS redirects in place which now needed > an update so they would not only work for constant host names but use the > 'Host' header information as target host. > So a simple > Redirect permanent / https://example.org/ > wasn't enough. I wanted to avoid using mod_rewrite (not included in my > configs so far anyway) and stick with the much simpler mod_alias so I read > through mod_alias.c. From what I could see there wasn't any means to do get > this working so I came up with > > > This looks like a job for the expression parser, ie this: > > Redirect permanent / https://%{HOST}/ > > (Syntax off top of head, probably wrong). > > Having done expression parser for the require directive, my next one on > the wishlist was DocumentRoot (to replace the mass virtual hosting module) > followed by mod_alias. > > Regards, > Graham > -- > > --001a11c12c3c60f4d004f0912461 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I remember a discussion about general support for thi= s kind of expression parsing after I asked for it via IRC/list but cannot r= emember what became of it. It would definitely be neat to have that kind of= thing in there - much less copy-n-paste like config sections ! Glad to hea= r there's progress on this front. Thanks !


On Wed,= Jan 22, 2014 at 4:42 PM, Graham Leggett <minfrin@sharp.fm> w= rote:
On 22 Jan 2014, at 5:36 PM, Thomas Eckert <thomas.r.w.eckert= @gmail.com> wrote:

Some time ago I put up = HTTP to HTTPS redirects in place which now needed an update so they would n= ot only work for constant host names but use the 'Host' header info= rmation as target host.
So a simple
=A0 Redirect permanent / https://example.org/
wasn't enough. I wanted to = avoid using mod_rewrite (not included in my configs so far anyway) and stic= k with the much simpler mod_alias so I read through mod_alias.c. From what = I could see there wasn't any means to do get this working so I came up = with

This looks like a job fo= r the expression parser, ie this:

Redirect permane= nt /=A0https://%{HOST}/

(Syntax off top of head,= probably wrong).

Having done expression parser for the require directive= , my next one on the wishlist was DocumentRoot (to replace the mass virtual= hosting module) followed by mod_alias.

Regards,
Graham
--


<= /div> --001a11c12c3c60f4d004f0912461--