Thanks guys your solutions worked.
_____ From: Lyle Wincentsen [mailto:[email protected]] Sent: Thursday, June 18, 2009 12:47 PM To: [email protected] Subject: Re: [us...@httpd] how to setup mod_ssl to accept only https requests >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 = "https:// <https://%22.$_server%5b'http_host'%5d.$_server%5b'request_uri'/> ".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; header("Location:$redirect"); } } -Lyle
