> The problem is that this HTTPS variable is not a standard variable
> that has been defined.
>
> Apache's SSL module will only set *a* value to HTTPS if in https is
> being used. The value it sets just so happens to be 'on'
>
> Windows servers (versions unkown) will set 'on' or 'off.
>
> Other se
On Wednesday 14 July 2004 05:07, Jamie wrote:
> > You want to specifically check for
> >
> > $_SERVER["HTTPS"] == "on"
> >
> > because if you're not using HTTPS then $_SERVER["HTTPS"] does not exist.
>
> If this is the case why does it work ok on my windows box?
Who cares what happens on a Wind
* Thus wrote Jamie:
> The code im using to test is:
> if ($_SERVER["HTTPS"] == "off")
> {
> print "We are not using HTTPS";
> }
> else
> {
> print "We are using HTTPS";
> }
>
>
> On my windows machine it works as expected with it displaying the correct
> message when using https and http. When i
> You want to specifically check for
>
> $_SERVER["HTTPS"] == "on"
>
> because if you're not using HTTPS then $_SERVER["HTTPS"] does not exist.
>
If this is the case why does it work ok on my windows box? Shouldnt it have
same output accross all platforms?
--
PHP General Mailing List (http://
On Wednesday 14 July 2004 04:57, Jamie wrote:
> The code im using to test is:
> if ($_SERVER["HTTPS"] == "off")
> {
> print "We are not using HTTPS";
> }
> else
> {
> print "We are using HTTPS";
> }
>
>
> On my windows machine it works as expected with it displaying the correct
> message when using
> Try $_ENV['HTTPS']
That prints nothing at all on windows and linux.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The code im using to test is:
if ($_SERVER["HTTPS"] == "off")
{
print "We are not using HTTPS";
}
else
{
print "We are using HTTPS";
}
On my windows machine it works as expected with it displaying the correct
message when using https and http. When i use my linux box it constantly
displays "We ar
More about your setup?
Try $_ENV['HTTPS'], or access phpinfo() page using https and see what
you get.
Jamie wrote:
Hi,
That code I sent is running on a Cobalt Linux server.
-Dan Joseph
Why does it work for you then and not for me on a rhl 9 setup?
On phpinfo I have:
SCRIPT_URI
https://host.mydo
Hi,
Can you post your code so we can look at it?
-Dan Joseph
> -Original Message-
> From: Jamie [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 13, 2004 4:48 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Detecting if browser is using a HTTP or
> HTTPS conn
> Hi,
>
> That code I sent is running on a Cobalt Linux server.
>
> -Dan Joseph
>
Why does it work for you then and not for me on a rhl 9 setup?
>On phpinfo I have:
>
>SCRIPT_URI
> https://host.mydomain.com/phpinfo.php
>_SERVER["SCRIPT_URI"]
> https://host.mydomain.com/phpinfo.php
>
>Michael.
Ac
Hi,
That code I sent is running on a Cobalt Linux server.
-Dan Joseph
> -Original Message-
> From: Jamie [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 13, 2004 3:37 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Detecting if browser is using a HTTP or
> HTTPS
Hello,
What about the following variables:
On phpinfo I have:
SCRIPT_URI https://host.mydomain.com/phpinfo.php
_SERVER["SCRIPT_URI"] https://host.mydomain.com/phpinfo.php
Michael.
On Tue, 13 Jul 2004 20:37:07 +0100
"Jamie" <[EMAIL PROTECTED]> wrote:
> Thanks for your reply Dan,
>
> I
Thanks for your reply Dan,
I have tried the $_SERVER['HTTPS'] on windows and it works fine. It replys
off when HTTPS isnt working and on when it is. But on linux it does nothing.
Can someone please confirm if this works or it does not work as i need a
method that is cross platform compatitable.
T
Hi,
if ($_SERVER["HTTPS"] != "on") {
$newurl = "https://"; . $_SERVER["SERVER_NAME"] .
$_SERVER["REQUEST_URI"];
header("location: $newurl");
die;
}
That's how I do it..
-Dan Joseph
> Is there a way to detect if a browser is using
14 matches
Mail list logo