REQUEST_URI problem 
Author Message
 REQUEST_URI problem

Hello,

I have a problem detecting the $HTTPS server variable. Reason is my
providers SSL setup something about a proxy, and PHP dropping the server
flags etc.

I need to check that the URL is https and if not do a header(location) to
the https path. None of the server variables seem to work so how can I get
the full URL including the https or http to do a quick check if it is there.

I thought it would be easy to just do an eregi to look for https and if its
not there do the header(location) thing.

I have tried $REQUEST_URI - not working as it drops the server flags.
Any other ideas.

Yobro



Sun, 31 Jul 2005 12:43:22 GMT  
 REQUEST_URI problem

Quote:

> Hello,

> I have a problem detecting the $HTTPS server variable. Reason is my
> providers SSL setup something about a proxy, and PHP dropping the server
> flags etc.

> I need to check that the URL is https and if not do a header(location) to
> the https path. None of the server variables seem to work so how can I get
> the full URL including the https or http to do a quick check if it is
> there.

> I thought it would be easy to just do an eregi to look for https and if
> its not there do the header(location) thing.

> I have tried $REQUEST_URI - not working as it drops the server flags.
> Any other ideas.

> Yobro

if ($_SERVER["SERVER_PORT"] == 443)
{
        // HTTPS
Quote:
}

else
{
        // HTTP

Quote:
}

Regards,

David

--
David Jonathan Grant
http://www.davidjonathangrant.info/



Sun, 31 Jul 2005 17:57:36 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Translate REQUEST_URI to filesystem path

2. $_SERVER["REQUEST_URI"] which doesn't give the variables?

3. Problems, problems, problems

4. Eiffel Problems, Problems, Problems

5. Finn Idiom problems and Re: {rho} problem

6. Combinatorial Problem [ & a new Combinatorial Problem ]

7. Database problem/Memory problem??

8. CW 2003 - Focus problem & a select problem

9. 32bit problem - one problem solved & another found

10. GForth problem or my problem?

11. REXX DLL problems solved (was Re: Problems getting C subcommand to work)

12. HTTP-Access2 problem (was Ruby Google problem)

 

 
Powered by phpBB® Forum Software