title: Sharing session with just the "www" subdomain
body: <p>I have faced this issue time and again, when ever I set up a new site/virtual host, I have to go and set the session domain ( or the framework equivalent ) to ".example.com" so that the session can be shared b/w "www.example.com" and "example.com". </p>
  
  <p>What this does is it messes the cookies for my staging and qa environments ( something like qa.example.com ..etc ). </p>
  
  <p>Whats the solution to this ? Should I setup a rewrite rule so that all www.example.com requests are rewritten to "example.com" or is there some other way ? </p>
  
  <p>I want to find out if there is a framework/language specific solution to this, what do people do when facing such an issue, whats the standard ? </p>