Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 90598 invoked by uid 500); 15 May 2003 23:19:35 -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: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 89646 invoked from network); 15 May 2003 23:19:24 -0000 Received: from unknown (HELO squarehosting.com) (12.158.191.98) by daedalus.apache.org with SMTP; 15 May 2003 23:19:24 -0000 Received: from mars.uni (squarehosting.com [12.158.191.98]) by squarehosting.com (8.12.8/8.11.6) with SMTP id h4FNEbx3026940 for ; Thu, 15 May 2003 18:14:37 -0500 Date: Thu, 15 May 2003 19:34:48 -0400 From: Jurgen To: users@httpd.apache.org Message-Id: <20030515193448.1cef7675.apache@squarehosting.com> In-Reply-To: <002101c31b1c$dd2109b0$6601a8c0@elvis> References: <20030515154954.4f94d40e.apache@squarehosting.com> <002101c31b1c$dd2109b0$6601a8c0@elvis> X-Mailer: Sylpheed version 0.8.11 (GTK+ 1.2.10; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: Re: [users@httpd] HTTP to HTTPS using mod_rewrite Hi, it should be in the http entry. Jurgen On Thu, 15 May 2003 16:02:07 -0400 "Beau Hebert" wrote: > Hi > Should I place the Rewrite instructions in the HTTPS virtual host entry > or in the HTTP entry. I tried to place it into the httpd.conf all by > itself, and it didn't seem to work. >=20 > Thanks again. >=20 > Beau >=20 > -----Original Message----- > From: Jurgen [mailto:apache@squarehosting.com]=20 > Sent: Thursday, May 15, 2003 3:50 PM > To: users@httpd.apache.org > Subject: Re: [users@httpd] HTTP to HTTPS using mod_rewrite >=20 >=20 > Hi, >=20 > if you like to redirect http://domain.com/login.php to > https://domain.com/login.php and not http://domain.com then I would use: >=20 > RewriteEngine On > RewriteRule ^(.*)$ https://domain.com$1 >=20 > This work if the http and https are seperate virtual hosts. Else you > have to add a RewriteCond to make sure that you only rewrite http > requests. >=20 > Jurgen >=20 >=20 > On Thu, 15 May 2003 15:17:36 -0400 > "Beau Hebert" wrote: >=20 > > Ya mean something like this: > >=20 > >=20 > > > > Redirect / https://server-name/ > > > >=20 > > Do I need to do anything else to ensure the scenario outlined=20 > > previously? > >=20 > > Beau > >=20 > > -----Original Message----- > > From: Jurgen [mailto:apache@squarehosting.com] > > Sent: Thursday, May 15, 2003 3:20 PM > > To: users@httpd.apache.org > > Subject: Re: [users@httpd] HTTP to HTTPS using mod_rewrite > >=20 > >=20 > > Hi, > >=20 > > why don't you put it all in the VirtualHost configuration? There is no >=20 > > need to use an .htaccess file. > >=20 > > Jurgen > >=20 > >=20 > > On Thu, 15 May 2003 14:36:42 -0400 > > "Beau Hebert" wrote: > >=20 > > > Not sure if the Redirect solution is quite the one I'm looking for.=20 > > > It > >=20 > > > could be, but as stated, I'm somewhat of a newbie...I'm attempting=20 > > > to > > > redirect all http requests to https. As it stands, if you enter the=20 > > > site at http://domain.com, the visitor is redirected to=20 > > > https://domain.com. I've got Listeners on ports 80 and 443, as well > as > >=20 > > > Virtual Hosts for both. Ultimately, what I would like to happen is > > > that if for some reason, during a session, someone attempted to take >=20 > > > the 's' away from https in say https://domain/login.jsp and tried to >=20 > > > simply access http://domain/login.jsp they would automatically be=20 > > > redirected back to https://domain/login.jsp (I would like this to=20 > > > happen on any and all pages in the site). As it stands now, I can > turn > >=20 > > > off port 80 in which the visitor gets a 'page cannot be displayed'. > > > The redirect solution seems only to redirect any given port 80 > request > >=20 > > > to the https domain's homepage (i.e. Redirect /=20 > > > https://server-name/) > >=20 > > > , and doesn_t seem to be intuitive enough as to keep the user on the > > > page that they are on and simply turn all http requests into https. > Am > >=20 > > > I making sense? I'm starting to confuse myself.... Succinctly put, > > > should the user attempt to tamper with the URL, I'd like all http=20 > > > requests rewritten to https and keep the user on the same page that=20 > > > they are on. Thanks for the help. > > >=20 > > > Beau > > >=20 > > > -----Original Message----- > > > From: Boyle Owen [mailto:Owen.Boyle@swx.com] > > > Sent: Thursday, May 15, 2003 11:10 AM > > > To: users@httpd.apache.org > > > Subject: RE: [users@httpd] HTTP to HTTPS using mod_rewrite > > >=20 > > >=20 > > > >-----Original Message----- > > > >From: Beau Hebert [mailto:bhebert@c-quential.com] > > > > > > > >I've been assigned the task of redirecting all incoming http=20 > > > >requests > >=20 > > > >to https. Problem is, I am not an administrator. I've done a little >=20 > > > >research, and it seems that this is possible using mod_rewrite.=20 > > > >I've copied the code that I've come up with below, but doesn't seem >=20 > > > >to be working. Can anyone confirm if this should/could work? > > > > > > > >Thanks much > > > >Beau > > > > > > > > > > > >RewriteCond %{SERVER_PORT} !^443$ > > > >RewriteRule ^/(.*) > > > >https://%{SERVER_NAME}/$1 [L,R] > > > > > > > > > > > >#This code within Virtual Host > > > >RewriteEngine on > > > >RewriteOptions inherit > > >=20 > > > It is not too clear what you are trying to do. HTTP requests, by > > > default, are sent to port 80. So your RewriteCond would not be=20 > > > satisfied in any case. > > >=20 > > > I am assuming you want to trap plain HTTP requests for your site and > > > redirect them to your HTTPS service. To do so, you need two virtual=20 > > > hosts, one on HTTP and one on HTTPS. The HTTP VH just redirects all=20 > > > requests to HTTPS. So: > > >=20 > > > Listen 80 > > > > > > Redirect / https://server-name/ > > > > > >=20 > > > Listen 443 > > > > > > ServerName server-name > > > SSLCert..stuff.. > > > DocumentRoot /path/to/ssl/docs > > > etc... > > > > > >=20 > > > Rgds, > > > Owen Boyle > > > Disclaimer: Any disclaimer attached to this message may be ignored. > > > > > > > > > > > > > > > >------------------------------------------------------------------- > > > >-- > > > >The official User-To-User support forum of the Apache HTTP Server=20 > > > >Project. See for more=20 > > > >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 > > > > > > > > > > > Diese E-mail ist eine private und pers=F6nliche Kommunikation. Sie hat > > > keinen Bezug zur B=F6rsen- bzw. Gesch=E4ftst=E4tigkeit der SWX Swiss= =20 > > > Exchange. This e-mail is of a private and personal nature. It is not >=20 > > > related to the exchange or business activities of the SWX Swiss=20 > > > Exchange. Le pr=E9sent e-mail est un message priv=E9 et personnel, sa= ns=20 > > > rapport avec l'activit=E9 boursi=E8re de la SWX Swiss Exchange > > >=20 > > > This message is for the named person's use only. It may contain > > > confidential, proprietary or legally privileged information. No=20 > > > confidentiality or privilege is waived or lost by any > mistransmission. > >=20 > > > If you receive this message in error, please notify the sender > > > urgently and then immediately delete the message and any copies of > it=20 > > > from your system. Please also immediately destroy any hardcopies of=20 > > > the message. You must not, directly or indirectly, use, disclose,=20 > > > distribute, print, or copy any part of this message if you are not > the > >=20 > > > intended recipient. The sender's company reserves the right to=20 > > > monitor > >=20 > > > all e-mail communications through their networks. Any views=20 > > > expressed > > > in this message are those of the individual sender, except where the >=20 > > > message states otherwise and the sender is authorised to state them > to > >=20 > > > be the views of the sender's company. > > >=20 > > >=20 > > >=20 > > > -------------------------------------------------------------------- > > > - > > > The official User-To-User support forum of the Apache HTTP Server=20 > > > Project. See for more=20 > > > 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 > > >=20 > > >=20 > > >=20 > > > -------------------------------------------------------------------- > > > - > > > The official User-To-User support forum of the Apache HTTP Server=20 > > > Project. See for more=20 > > > 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 > > >=20 > >=20 > > --------------------------------------------------------------------- > > The official User-To-User support forum of the Apache HTTP Server=20 > > Project. See for more=20 > > 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 > >=20 > >=20 > >=20 > >=20 > > --------------------------------------------------------------------- > > The official User-To-User support forum of the Apache HTTP Server=20 > > Project. See for more=20 > > 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 > >=20 >=20 > --------------------------------------------------------------------- > 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 >=20 >=20 >=20 >=20 > --------------------------------------------------------------------- > 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 >=20 --------------------------------------------------------------------- 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