httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lyle Wincentsen <>
Subject Re: [users@httpd] how to setup mod_ssl to accept only https requests
Date Thu, 18 Jun 2009 07:16:53 GMT
>Davide wrote:
>You have two way: remove the 'Listen 80' option, basically disabling the
>whole http part, or add a 'RedirectPermanent / https:...' to the default
>http vhost to redirect all the http request to https.

You could also call the following php function at the top of each page
where you want to use SSL:

function redirect_to_https() {
if ($_SERVER['HTTPS']!="on") {
      $redirect =

View raw message