switching http requests to https
am 28.07.2002 01:48:01 von novozhilov_sasha
Hi.
I need to be able to transparently (to the user) switch user's http requests
to https. Meaning when the user opens a browser and types
"http://server/resourse" I need to recognize that the request came in as
http and need to instruct the browser to resend it as
"https://server/resourse". Ideally I'd like to accomplish that via some
mod_perl script, but if there is a configuration directive, that would work
too.
I'd appreciate any help regarding how to accomplish this.
thanks a lot,
Sasha Novozhilov
____________________________________________________________ __________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org
Re: switching http requests to https
am 28.07.2002 16:07:04 von Flemming Frandsen
novozhilov_sasha@emc.com wrote:
> I need to be able to transparently (to the user) switch user's http requests
> to https. Meaning when the user opens a browser and types
> "http://server/resourse" I need to recognize that the request came in as
> http and need to instruct the browser to resend it as
> "https://server/resourse".
Ah, that's simple, just set the Location header, this is what is known
as an external redirect and it works nicely for doing what you want:
$r->cgi_header_out("Location", "https://yaddayadda")
HTH
--
Regards Flemming Frandsen - http://dion.swamp.dk
PartyTicket.Net co founder & Yet Another Perl Hacker
____________________________________________________________ __________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org
Re: switching http requests to https
am 28.07.2002 21:37:54 von Danalien
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
There is a very simple approach, using the rewrite directive.
(forwarding it a other https server or virtualhost of yours.
I'm actively using:
redirect / https://www..com/
You can put in the-main-conf or in a VirtualHost,
Example:
(I don't use http, only https, so I've made a VH for http to forward to https)
:80>
SSLEngine Off
port 80
redirect / https://www..com/
ServerName www..com
ServerAdmin @.com
ErrorLog logs/dummy-www..com-error_log
CustomLog logs/dummy-www..com-access_log common
>Hi.
>
>I need to be able to transparently (to the user) switch user's http requests
>to https. Meaning when the user opens a browser and types
>"http://server/resourse" I need to recognize that the request came in as
>http and need to instruct the browser to resend it as
>"https://server/resourse". Ideally I'd like to accomplish that via some
>mod_perl script, but if there is a configuration directive, that would work
>too.
>I'd appreciate any help regarding how to accomplish this.
>
>thanks a lot,
>Sasha Novozhilov
>___________________________________________________________ ___________
>Apache Interface to OpenSSL (mod_ssl) www.modssl.org
>User Support Mailing List modssl-users@modssl.org
>Automated List Manager majordomo@modssl.org
// with regards
// ID :: danalien ::
PGP Public Key Fingerprint: C891 D3A1 427A A5E7 449F B19E 1E85 A109
-----BEGIN PGP SIGNATURE-----
Version: PGPsdk version 1.7.1 (C) 1997-1999 Network Associates, Inc. and its affiliated companies.
iQA/AwUBPUQ6Ax6FoQlEaqKIEQLNEwCgxsmRowh0I3AsXohIgTMjbNGdKwMA oOoz
73h9KA46NCgUVl9W9UPdsCpX
=Aa9m
-----END PGP SIGNATURE-----
____________________________________________________________ __________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org