You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Divakar <di...@cisco.com> on 2006/08/03 05:13:40 UTC

[users@httpd] redirecting https to http..

Hi,

I would like to redirect all users trying
https://example.com/ ==>
http://example.com

we are still waiting for ssl certificate, but
meanwhile we want to redirect users instead of
getting a popup with "Cert from unknown authority"
when user try https://example.com

So far I am unlucky to get mod_rewrite work.

Things tried inside httpd.conf

RewriteEngine On
and following combinations..

1.
RewriteCond %{HTTPS} !=off
RewriteRule ^(.*)//(.*) http://%{SERVER_NAME}/$2 [L,R,NC]

2.
RewriteCond %{HTTPS} =on
RewriteRule ^/(.*) http://%{SERVER_NAME}/$1 [L,R,NC]

3.
RewriteCond %{HTTPS} !=off
RewriteRule ^/(.*) http://%{SERVER_NAME}/$1 [L,R,NC]

4.
RewriteCond %{SERVER_PORT} !=80
RewriteRule ^/(.*) http://%{SERVER_NAME}/$1 [L,R,NC]

Anybody know how to get this work..? Please help me..

TIA
Divakar

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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] redirecting https to http..

Posted by Divakar <di...@cisco.com>.
Nick Kew wrote:
> No chance.  The browser popups happen *before* the request
> is decrypted and things like redirects can be applied.
>   
Thanks Nick Kew, Owen Boyle and Brian for helping me out.

Meanwhile what we understood from certificate issuing authority
that If we keep the webserver name un-changed we can re-use the
certificate issued to us. (we have 6month valid time). We are going
in that direction.

thanks again
Divakar

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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] redirecting https to http..

Posted by Nick Kew <ni...@webthing.com>.
On Thursday 03 August 2006 04:13, Divakar wrote:
> Hi,
>
> I would like to redirect all users trying
> https://example.com/ ==>
> http://example.com
>
> we are still waiting for ssl certificate, but
> meanwhile we want to redirect users instead of
> getting a popup with "Cert from unknown authority"
> when user try https://example.com

No chance.  The browser popups happen *before* the request
is decrypted and things like redirects can be applied.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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] redirecting https to http..

Posted by Brian Munroe <br...@gmail.com>.
> I am sorry I guess I was not clear.
>
> Just redirection works fine..
> The problem is when I issue https://example.com on browser
> I get certificate is not signed by proper authority..<blah>
> The reason is I have created a self signed certificate and installed.
> I have sent certificate to get it signed but meanwhile I do not want
> users get popup msg. Is there a way to redirect users..?
>

Oh now I get it.  Hum.  I would have thought that it would redirect
(or rewrite) before it tried to do the SSL handshake.  I guess not,
eh?

Sorry I couldn't be of more help.

-- brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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] redirecting https to http..

Posted by Divakar <di...@cisco.com>.
>
> How about using a Redirect instead of a Rewrite rule?
>
> Put something like this in the section for your SSL virtual host
>
> Redirectmatch ^/(.*)$ http://example.com/$1
Brian,

I am sorry I guess I was not clear.

Just redirection works fine..
The problem is when I issue https://example.com on browser
I get certificate is not signed by proper authority..<blah>
The reason is I have created a self signed certificate and installed.
I have sent certificate to get it signed but meanwhile I do not want
users get popup msg. Is there a way to redirect users..?

thanks for helping me out..
Divakar

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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] redirecting https to http..

Posted by Brian Munroe <br...@gmail.com>.
On 8/2/06, Divakar <di...@cisco.com> wrote:
> Hi,
>
> I would like to redirect all users trying
> https://example.com/ ==>
> http://example.com
>

How about using a Redirect instead of a Rewrite rule?

Put something like this in the section for your SSL virtual host

Redirectmatch ^/(.*)$ http://example.com/$1

-- brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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