Forum Moderators: phranque

Message Too Old, No Replies

catch all subdomain, and sessions issue!

         

smagdy

2:04 pm on Aug 4, 2009 (gmt 0)

10+ Year Member



Hi

I followed [the tutorial cited here [webmasterworld.com]] to catch all sub-domains

So there is something very strange happening..

if current url is sub1.sitename.com, I store the subdomain in session, so
$_SESSION['sub'] will be = sub1

If I change the url to sub2.sitename.com and echo the session, i find it = sub2 before I do anything, so it becomes equal the new sub domain after session_start();

I am trying to see if the current session = the subdomain, so i redirect, if user logged in and tried to change the sub domain after login.

Anything you can think of why this happens?

Thanks in advance!

[edited by: jdMorgan at 2:21 pm (utc) on Aug. 4, 2009]
[edit reason] URL reference. [/edit]