[BlueOnyx:11796] Re: Web Alias Redirects with SSL

Gerald Waugh gwaugh at frontstreetnetworks.com
Thu Dec 13 06:20:42 -05 2012


On 12/12/2012 11:13 AM, Robert Fitzpatrick wrote:
> On 12/12/2012 11:35 AM, Michael Stauber wrote:
>> So if your certificate is for "www.vsite.com", all you need to do is to
>> tick the checkbox for "Alias redirects to main site". That'll already do
>> all the redirection you want and anyone who visits an alias will be
>> redirected to the main site where the SSL certificate is active.
> Thanks Michael, understood. Yes, that redirection works fine after the
> browser warning issued due to the naming, that is what we are trying to
> avoid.
>
We use this in a php script to switch from http to https.
This may or may not help

<?php
   if ( preg_match("/http:/", $_SERVER["SCRIPT_URI"]))
   {
     if ( !preg_match("/:443\//", $_SERVER["SCRIPT_URI"]) )
     {
         header("Location: " . str_replace("http:", "https:", 
$_SERVER["SCRIPT_URI"]));
     }
   }
?>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20121213/2ab3ca0a/attachment.html>


More information about the Blueonyx mailing list