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 D8E631064B for ; Tue, 16 Apr 2013 14:48:46 +0000 (UTC) Received: (qmail 17967 invoked by uid 500); 16 Apr 2013 14:48:43 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 17939 invoked by uid 500); 16 Apr 2013 14:48:43 -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 17931 invoked by uid 99); 16 Apr 2013 14:48:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Apr 2013 14:48:43 +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 salderman1@udayton.edu designates 74.125.82.48 as permitted sender) Received: from [74.125.82.48] (HELO mail-wg0-f48.google.com) (74.125.82.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Apr 2013 14:48:38 +0000 Received: by mail-wg0-f48.google.com with SMTP id f11so563584wgh.15 for ; Tue, 16 Apr 2013 07:48:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:x-gm-message-state; bh=uoB6sOuJXH3jrep+wqPa+kOW3FVYw/UI+3nR6d77Yrc=; b=KOUC8SGWdPXKjhWAVVT+PbdYoCYWnJBy0m+ghYKgkFv7g/bUwHxluvi0rwJwlH+Mf3 dS5cEvj5MaiOCffjnkAI0bnYYl9hVS80B9ap3efWpKsRVwIf5rQluoeC740UtN474szM 1hdI8IxSL0gVx8a8YVWTfi5lO3JsbByCUUUBHuhgXXxKqiEzCM0unlS/ixqzaWfAxCDJ noZb7KI7r2x92WFVf3UfRNlZsB+70u8cxd8Sw28UUrDb7d01tQ1FFL2yPfqMKuEC08Q1 HThQA7BAC2nGnQ0VugswszKOdqoQ4z7Aw4LbKxFKpwkd4zoORckGFl7pNKytAc0agKAg MRwQ== MIME-Version: 1.0 X-Received: by 10.194.60.195 with SMTP id j3mr4535271wjr.33.1366123697215; Tue, 16 Apr 2013 07:48:17 -0700 (PDT) Received: by 10.194.54.1 with HTTP; Tue, 16 Apr 2013 07:48:16 -0700 (PDT) In-Reply-To: References: Date: Tue, 16 Apr 2013 10:48:16 -0400 Message-ID: From: Sean Alderman To: users@httpd.apache.org Content-Type: multipart/alternative; boundary=047d7b86e2f8b2d5b404da7b7536 X-Gm-Message-State: ALoCoQlFhtqcdT+9J8yYPIvcair/mSuQf/HXaxSmDjmRMfpcd3vk/rwMQaXMd5vnDVPv3d+hudlB X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Redirect HTTP to HTTPS does not work (mod_rewrite) --047d7b86e2f8b2d5b404da7b7536 Content-Type: text/plain; charset=ISO-8859-1 Assuming there is additional URL coming after /dashboard when the server sends you the login page... e.g. /dashboard/login.php ...Your redirect will not match with the $ at the end of the condition... RewriteRule ^/dashboard$ https://%{HTTP_HOST}/dashboard [R=301,L] says /dashboard, so /dashboard/login.php (or whatever additional path elements there may be) will not match. Perhaps try: RewriteRule ^/dashboard https://%{HTTP_HOST}/dashboard [R=301,L] Or: RewriteRule ^/dashboard(.*)$ https://%{HTTP_HOST}/dashboard$1 [R=301,L] On Tue, Apr 16, 2013 at 10:33 AM, Felipe Roman wrote: > On Tue, Apr 16, 2013 at 10:07 AM, Igor Cicimov wrote: > >> There shouldnt be empty line between these two. >> > Hi Igor, > > In the conf file there isn't empty line between then: > > RewriteCond %{HTTPS} !=on > RewriteRule ^/dashboard$ https://%{HTTP_HOST}/dashboard [R=301,L] > > and I got the same problem after the redirect. I'm going to create a > Virtualhost for this site and test using RedirectSSL, something like: > > NameVirtualHost *:80 > > ServerName mysite.example.com > DocumentRoot /usr/local/apache2/htdocs > * Redirect permanent /secure https://mysite.example.com/secure* > > > and see what happens. > > Thanks again > > -- > Best Regards, > Felipe Roman > LinkedIn http://au.linkedin.com/in/feliperoman > --047d7b86e2f8b2d5b404da7b7536 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Assuming there is additional URL coming after /dashboard when the server se= nds you the login page...

e.g. /dashboard/login.php

...Your r= edirect will not match with the $ at the end of the condition...

RewriteRule ^/dashboard$ https://%{HTTP_HOST}/dashboard [R=3D301,L]

= says <beginning of line>/dashboard<end of line>, so /dashboard/= login.php (or whatever additional path elements there may be) will not matc= h.

Perhaps try:

RewriteRule ^/dashboard https://%{HTTP_HOST}/dashbo= ard [R=3D301,L]

Or:

RewriteRule ^/dashboard(.*)$ https://%{HT= TP_HOST}/dashboard$1 [R=3D301,L]

On Tue, = Apr 16, 2013 at 10:33 AM, Felipe Roman <roman.felipe@gmail.com>= ; wrote:
On Tue, A= pr 16, 2013 at 10:07 AM, Igor Cicimov <icicimov@gmail.com> = wrote:

There shouldnt be empty line between these = two.

Hi Igor,

In the conf file = there isn't empty line between then:

Rewr= iteCond %{HTTPS} !=3Don
RewriteRule ^/dashboard= $ https://%{HTTP_HOST}/dashboard [R=3D301,L]

and I got the same problem after the redire= ct. I'm going to create a Virtualhost for this site and test using Redi= rectSSL, something like:

NameVirtualHost *:80
<VirtualHost *= :80>
=A0 =A0ServerName m= ysite.example.com
=A0 =A0DocumentRoot /usr/local/apache2/htdocs
<= b>=A0 =A0Redirect permanent /secure https://mysite.example.com/secure
</VirtualHost>

and see what happens.

=
Thanks again

--
Best Regards,
Felipe Roman
LinkedIn http://au.linkedin.com/= in/feliperoman

--047d7b86e2f8b2d5b404da7b7536--