Forum Moderators: coopster

Message Too Old, No Replies

getenv always returns www?

         

jackvull

10:58 am on Jul 6, 2006 (gmt 0)

10+ Year Member



I need to figure out if users have somehow come to the domain [aaa.com...] instead of [aaa.com...] as my SSL certificate only works on [aaa.com...]

I'm using getenv but it always seems to return www.aaa.com - is that right?

jatar_k

2:56 pm on Jul 6, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



why not just forward all your non www traffic to www?

jackvull

3:11 pm on Jul 6, 2006 (gmt 0)

10+ Year Member



But how do you check if it's non-www.
The getenv('SERVER...') thing I'm using seems to report everything as www

jdMorgan

3:22 pm on Jul 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Wrong variable? Try querying the HTTP_HOST header, which will return the hostname requested by the client, rather than the canonical server name as declared in the (fixed) server configuration.

Jim