[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] Redirect http to https
- Subject: RE: [cobalt-users] Redirect http to https
- From: "Steven Young" <steven.young@xxxxxxxxxxxxxxx>
- Date: Tue Jan 8 03:56:00 2002
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
> Is there any way to make this work for a sub-directory of a site i.e.
> /home/sites/siteX/web/secure I have a customer who is concerned that his
> 'secure form' can also be access via http and security goes out of the
> window. I tried doing the change but get an internal server
> error but then
> I tried it on the main site as well and got an internal server error.
>
> Anyone know what's wrong?
>
> Thanks
>
> Gavin
>
Hi Gavin,
I have PHP installed which lets you easily force any page to be accessed via
SLL. Just add the following PHP to the top of each page you want to be
accessed only via SSL.
<?
if($SERVER_PORT != "443")
{
header("Location: https://" . $HTTP_HOST);
exit;
}
?>
Change 443 to whatever port SSL is using on your RAQ but this is the default
so if you havn't tinckered too much with your server then this should work
straight off.
If nothing else, it's a good reason to set PHP up on your box :-)
Thanks,
Steven