You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Roland RoLaNd <r_...@hotmail.com> on 2012/02/01 14:28:27 UTC

[users@httpd] mod rewrite question https to http

Dear all,
I'm a complete newbie to apache and i've inherited a virtual host setup.i have the need to redirect all traffic from https to http (443 to 80, yes that is correct)

the relevant rewrite rules in httpd.conf are as such:
    # all other traffic is redirected to the SSL site    RewriteEngine On    RewriteRule ^/cgi-bin/u/testing.cgi - [L]    RewriteRule ^/cgi-bin/voice - [L]    RewriteRule ^/cgi-bin/testing2.cgi - [L]    RewriteRule ^/cgi-bin/u/results.pl - [L]    RewriteRule ^/audio - [L]   RewriteRule ^/gram - [L]   RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [L,R=301]
Any advice on how to force all https links to be redirected to http ?
Thanks in advance 		 	   		  

RE: [users@httpd] mod rewrite question https to http

Posted by Roland RoLaNd <r_...@hotmail.com>.
Thank you for your help.is there any ebook you advise me to read to catch up on the below ?

Date: Thu, 2 Feb 2012 07:04:06 -0200
From: imedina@grosshat.com
To: users@httpd.apache.org
Subject: Re: [users@httpd] mod rewrite question https to http

Hi Roland,
 
on the context of SSL Virtual Host put the following rewrite rules:
 
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
 
iñigo
 
 
On Wed, 1 Feb 2012, Roland RoLaNd wrote:
 
>
> Dear all,
> I'm a complete newbie to apache and i've inherited a virtual host setup.i have the need to redirect all traffic from https to http (443 to 80, yes that is correct)
>
> the relevant rewrite rules in httpd.conf are as such:
>    # all other traffic is redirected to the SSL site    RewriteEngine On    RewriteRule ^/cgi-bin/u/testing.cgi - [L]    RewriteRule ^/cgi-bin/voice - [L]    RewriteRule ^/cgi-bin/testing2.cgi - [L]    RewriteRule ^/cgi-bin/u/results.pl - [L]    RewriteRule ^/audio - [L]   RewriteRule ^/gram - [L]   RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [L,R=301]
> Any advice on how to force all https links to be redirected to http ?
> Thanks in advance

---------------------------------------------------------------------
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 		 	   		  

Re: [users@httpd] mod rewrite question https to http

Posted by Iñigo Medina <im...@grosshat.com>.
Hi Roland,

on the context of SSL Virtual Host put the following rewrite rules:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}

iñigo


On Wed, 1 Feb 2012, Roland RoLaNd wrote:

>
> Dear all,
> I'm a complete newbie to apache and i've inherited a virtual host setup.i have the need to redirect all traffic from https to http (443 to 80, yes that is correct)
>
> the relevant rewrite rules in httpd.conf are as such:
>    # all other traffic is redirected to the SSL site    RewriteEngine On    RewriteRule ^/cgi-bin/u/testing.cgi - [L]    RewriteRule ^/cgi-bin/voice - [L]    RewriteRule ^/cgi-bin/testing2.cgi - [L]    RewriteRule ^/cgi-bin/u/results.pl - [L]    RewriteRule ^/audio - [L]   RewriteRule ^/gram - [L]   RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [L,R=301]
> Any advice on how to force all https links to be redirected to http ?
> Thanks in advance

Re: [users@httpd] mod rewrite question https to http

Posted by Igor Cicimov <ic...@gmail.com>.
Put the last rewrite rule inside your ssl virtual host and change https to
http.
On Feb 2, 2012 12:29 AM, "Roland RoLaNd" <r_...@hotmail.com> wrote:

>  Dear all,
>
> I'm a complete newbie to apache and i've inherited a virtual host setup.
> i have the need to redirect all traffic from https to http (443 to 80, yes
> that is correct)
>
> the relevant rewrite rules in httpd.conf are as such:
>
>     # all other traffic is redirected to the SSL site
>     RewriteEngine On
>     RewriteRule ^/cgi-bin/u/testing.cgi - [L]
>     RewriteRule ^/cgi-bin/voice - [L]
>     RewriteRule ^/cgi-bin/testing2.cgi - [L]
>     RewriteRule ^/cgi-bin/u/results.pl - [L]
>     RewriteRule ^/audio - [L]
>    RewriteRule ^/gram - [L]
>    RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [L,R=301]
>
> Any advice on how to force all https links to be redirected to http ?
>
> Thanks in advance
>