Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3B8D5200CD6 for ; Mon, 17 Jul 2017 02:45:30 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 39D2D163621; Mon, 17 Jul 2017 00:45:30 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 58F11163599 for ; Mon, 17 Jul 2017 02:45:29 +0200 (CEST) Received: (qmail 40929 invoked by uid 500); 17 Jul 2017 00:45:27 -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 40919 invoked by uid 99); 17 Jul 2017 00:45:27 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jul 2017 00:45:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5FF10C0BEC for ; Mon, 17 Jul 2017 00:45:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.68 X-Spam-Level: X-Spam-Status: No, score=0.68 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id M8ElCMLethZ7 for ; Mon, 17 Jul 2017 00:45:20 +0000 (UTC) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 5044B5FBE2 for ; Mon, 17 Jul 2017 00:45:20 +0000 (UTC) Received: by mail-wm0-f43.google.com with SMTP id b134so32680788wma.0 for ; Sun, 16 Jul 2017 17:45:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=eyfe1jippK7FEVNAYp14CLZqqPxVBVN+//DajVpvS8Q=; b=rdR/C85A6tf15J/wV/rVXVhLTdqtWNCEjMrZzsgwhALp2i5dnl/1Q9XfNEzB8SRMaZ 6LJOwUQFcESJ8mgzbxtMLtLTHM26mEW5p9vyRhLQolJxjifcepe+mGptI1bBVWjJlYGa KKaYt6V3bsHGkk/GbwiDS7d8NqocjMB2huQjWCY/woqKSDqRfJGymej91inhlJhqCP7+ AxcoMhHzioeJjzIRMIfLOzFSD7ovxo2vJS8anOJngGmQip2XPeNwCg96qcDpL940F87U nbmaLGgHwiSHiJTno50J6ZMibmoAbWMXeAzdOzaIuXINXpvS+n6uwdfcBJbgKfdAoQTI wARw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=eyfe1jippK7FEVNAYp14CLZqqPxVBVN+//DajVpvS8Q=; b=IIkEpLFwuIQPzR7NSSZSqhypcR7YBRSOTuw26SXZ0YZsb1NSE+Wj5GzNs5H9STmjMD z+JLiN6j5zHT6zpeC/UjUTJ0SWQZhm4k8spgjeq3h00lGkHzmjSrni0VM+CZJdpoZ2m7 2BoWqNaN0d+pWfscX68KeqriVAJpQmeUE9I7DRDDvAVjDiR1xSEI5iJeOb2/VlFBGA5q SADW6eNaf8KpOMg0i9SiNr9TvumDTomS+W1Ouu1o/EZd6VfKJFYfIKXzgq/EChU94Dmh g22dkId5aTKCTTvmK19OKFNdBxW5aZOWgmZzdNaJUc+VaVQZqN711++dfmhTexplpvsd UY7A== X-Gm-Message-State: AIVw112oldSnZMatC93w97OR2WQW5BvS3fzAfd8E3VkNzQ1p8K5XiKJ1 t4lwbBi4Fcfr/BYg2WpaeNPPOTvxBg== X-Received: by 10.28.18.16 with SMTP id 16mr2351364wms.93.1500252319738; Sun, 16 Jul 2017 17:45:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.129.130 with HTTP; Sun, 16 Jul 2017 17:45:18 -0700 (PDT) In-Reply-To: References: From: David Mehler Date: Sun, 16 Jul 2017 20:45:18 -0400 Message-ID: To: users@httpd.apache.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [users@httpd] virtual host double slash effect, need solution archived-at: Mon, 17 Jul 2017 00:45:30 -0000 Hello, Thanks. That sure made my file easier to handle. One thing can I using redirect go from http to https? Like example.com redirects to https://www.example.com? Thanks. Dave. On 7/16/17, Daniel wrote: > Redirect is simpler as you can see, it redirects everything, it has a > regex version called RedirectMatch. Both are provided by mod_alias. > > RewriteRule is for more complex things, yes it can redirect too, but > as you have seen yourself, the most simple thing can bring confusion. > RewriteRute is provided by mod_rewrite and should be used only when > there is no simpler option for the sake of simplicity. > > The rule of thumb is to go for simpler configuration directives > whenever possible, and a simple redirection like that in virtualhost > is a task perfect for Redirect. > > 2017-07-16 19:14 GMT+02:00 David Mehler : >> Hello, >> >> Thanks. I'll try the rewrite redirect. >> >> With regards the redirect option, the simpler way, does it do the tls >> conversion unsecure to secure? What would the advantages/disadvantages >> of rewrite and redirect? >> >> Thanks. >> Dave. >> >> >> On 7/16/17, Daniel wrote: >>> And while at it why not use simple Redirect's since your config fits >>> perfectly to use them: >>> >>> >>> ServerName example.com >>> Redirect / http://www.example.com/ >>> >>> >>> simpler, gets the job done, and you don't need a cannon to smash a fly. >>> >>> >>> 2017-07-16 17:48 GMT+02:00 Luca Toscano : >>>> Hi David, >>>> >>>> 2017-07-15 3:11 GMT+02:00 David Mehler : >>>>> >>>>> Hello, >>>>> >>>>> I'm running Apache 2.4 on a FreeBSD 10.3 system, with several virtual >>>>> hosts. My goal is to have all of them completely ssl, except for the >>>>> .well-known area needed for letsencrypt. >>>>> >>>>> >>>>> ServerName example.com >>>>> RewriteEngine On >>>>> RewriteRule ^/?(.*) http://www.example.com$1 [R,L] >>>>> # This line also produces the double slash effect >>>>> # RewriteRule ^/?(.*) http://www.example.com/$1 [R,L] >>>>> >>>>> >>>> >>>> Have you tried with RewriteRule ^(.*)$ https://www.example.com$1 >>>> [R=301,L] >>>> ? >>>> (note also the https, IIUC you need to force TLS). >>>> >>>> Hope that helps, >>>> >>>> Luca >>>> >>> >>> >>> >>> -- >>> Daniel Ferradal >>> IT Specialist >>> >>> email dferradal at gmail.com >>> linkedin es.linkedin.com/in/danielferradal >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org >>> For additional commands, e-mail: users-help@httpd.apache.org >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org >> For additional commands, e-mail: users-help@httpd.apache.org >> > > > > -- > Daniel Ferradal > IT Specialist > > email dferradal at gmail.com > linkedin es.linkedin.com/in/danielferradal > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org > For additional commands, e-mail: users-help@httpd.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org