Forum Moderators: phranque

Message Too Old, No Replies

Redirect all https traffic to http

         

gigot

3:00 pm on Jul 7, 2009 (gmt 0)

10+ Year Member



I've been searching the forum for solution, but have not found one. I have found some postings pertaining to redirecting some https traffic to http, but I need to do so globally. I apologize if the solution is already in the forum yet eluded my searching... Oh, & I'm new to Apache.

I want to redirect all traffic coming on https to http. I have a few Virtual Hosts defined in httpd.conf. I have tried putting the following in the <VirtualHost *:443> stanzas for each virtual host:

ServerName host1.domain.net
Redirect permanent / [host1.domain.net...]

ServerName host2.domain.net
Redirect permanent / [host2.domain.net...]

ServerName host3.domain.net
Redirect permanent / [host3.domain.net...]

The problem with that solution is that visitors get an SSL certificate warning before getting redirected. What I am trying to achieve is for

[host1.domain.net...] redirect to [host1.domain.net...]

[host2.domain.net...] redirect to [host2.domain.net...]

[host3.domain.net...] redirect to [host3.domain.net...]

Can this be done before visitors connect on port 443 and get a certificate warning? --thanks, Gigot

jdMorgan

3:19 pm on Jul 7, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> Can this be done before visitors connect on port 443 and get a certificate warning?

No it cannot. The redirect cannot be processed until after the connection is made, and that connection depends on having a valid SSL certificate.

Jim

gigot

3:28 pm on Jul 7, 2009 (gmt 0)

10+ Year Member



Thanks for the quick response Jim. That was what I was afraid of.... Gigot

FormosaKing

4:15 am on Jul 8, 2009 (gmt 0)

10+ Year Member



You can do this easily, but not with apache. Look up Pound:
[apsis.ch...]